Last active
July 20, 2020 06:52
-
-
Save aashishrbhandari/7bf9abf684345020dafd05bff523d90f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMP Package Related Tech Terms | |
------------------------------- | |
dpkg | |
apt | |
apt-get | |
aptitude | |
Good Articles & Discussions: | |
----------------------------- | |
https://www.reddit.com/r/debian/comments/9whj01/whats_the_difference_between_apt_aptitude_aptget/ | |
https://askubuntu.com/questions/347898/whats-difference-of-apt-get-and-aptitude | |
https://pthree.org/2007/08/12/aptitude-vs-apt-get/ | |
https://raphaelhertzog.com/2011/06/20/apt-get-aptitude-%e2%80%a6-pick-the-right-debian-package-manager-for-you/ | |
Search and Explanation that i liked and understood: | |
--------------------------------------------------- | |
-------------[1]-------------- | |
Dpkg is the program that installs .deb files, apt-get is the program that tracks the available packages and downloads them/hands off to dpkg, apt is a wrapper for apt-get/apt-cache/apt-key with a subset of commands, and aptitude is a more elegant front-end for the previous. | |
dpkg - debian package manager(install/remove) | |
but dpkg does not know from where to get the packages it can install any debian(.deb) packages provided to it. | |
apt, apt-get & aptitude are the application that uses the config file (sources.list from /etc/apt/sources.list and few more user added config files from extended dir /etc/apt/sources.list.d/) | |
apt, apt-get & aptitude uses the sources.list file and download the packges from the internet and provide ti to dpkg for installation. | |
ofcourse, you can manually download and install BUT they are also responsible for manataining the dependencies of the user needed package, manually doing so ( getting the dependencies and installing becomes very tedious ) | |
Tool: apt | |
---------- | |
As you can see the apt man pages provides details | |
as to how apt-get and it's related command apt-cache | |
apt provides a single point to for apt-get and apt-cache | |
autoremove (apt-get(8)) | |
autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the | |
meantime. | |
search (apt-cache(8)) | |
search can be used to search for the given regex(7) term(s) in the list of available packages and display matches. This can e.g. be useful if you are looking for packages having a specific feature. If you are looking | |
for a package including a specific file try apt-file(1). | |
show (apt-cache(8)) | |
Show information about the given package(s) including its dependencies, installation and download size, sources the package is available from, the description of the packages content and much more. It can e.g. be | |
helpful to look at this information before allowing apt(8) to remove a package or while searching for new packages to install. | |
-------------[2]------------------ | |
As mentioned be http://pthree.org/2007/08/12/aptitude-vs-apt-get/, aptitude has a much easier to use command-line interface. | |
Under the hood, aren't they using the same APT system? Yes. | |
The underlying system is not just apt, but dpkg. This system is just as dumb as RPM, it can only handle the installation and administration of single packages. It tracks which installed files belong to which package. | |
apt handles the downloads of repositories, tracking of dependencies, and so on for all individual packages - which it then installs using dpkg. aptitude does the same, with a different interface. | |
-------------[3]-------------- | |
In the Debian world, we’re usually thinking of APT-based software when we’re referring to a “package manager”. But in truth, the real package manager is dpkg. It’s the low-level tool that takes a .deb file and extracts its content on the disk, or that takes the name of a package to remove the associated files, etc. | |
APT is better known because it’s the part of the packaging infrastructure that matters to the user. APT makes collection of software available to the user and does the dirty work of downloading all the required packages and installing them by calling dpkg in the correct order to respect the dependencies. | |
But APT is not a simple program, it’s a library and several different APT frontends have been developed on top of that library. The most widely known is apt-get since it’s the oldest one, and it’s provided by APT itself. | |
Upgrade Single Package But Do Not Acidentally Install it if it DOES NOT Exists: | |
--------------------------------------------------------------------------------- | |
Command: apt-get install --only-upgrade <package-name> | |
If i want to install python3.7 | |
Example: | |
--------- | |
apt-get install --only-upgrade python3.7 | |
Few Intersting things that i saw in artices, forums, dicussions and QNA: | |
------------------------------------------------------------------------- | |
-------------------[1]--------------------- | |
root@swgdemo:~# apt-get moo | |
(__) | |
(oo) | |
/------\/ | |
/ | || | |
* /\---/\ | |
~~ ~~ | |
..."Have you mooed today?"... | |
root@swgdemo:~# aptitude moo | |
There are no Easter Eggs in this program. | |
root@swgdemo:~# apt moo | |
(__) | |
(oo) | |
/------\/ | |
/ | || | |
* /\---/\ | |
~~ ~~ | |
..."Have you mooed today?"... | |
----------------[2]--------------------- | |
root@swgdemo:~# aptitude moo | |
There are no Easter Eggs in this program. | |
root@swgdemo:~# aptitude moo -v | |
There really are no Easter Eggs in this program. | |
root@swgdemo:~# aptitude moo -vv | |
Didn't I already tell you that there are no Easter Eggs in this program? | |
root@swgdemo:~# aptitude moo -vvv | |
Stop it! | |
root@swgdemo:~# aptitude moo -vvvv | |
Okay, okay, if I give you an Easter Egg, will you go away? | |
root@swgdemo:~# aptitude moo -vvvvv | |
All right, you win. | |
/----\ | |
-------/ \ | |
/ \ | |
/ | | |
-----------------/ --------\ | |
---------------------------------------------- | |
root@swgdemo:~# aptitude moo -vvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
root@swgdemo:~# aptitude moo -vvvvvvvvvvv | |
What is it? It's an elephant being eaten by a snake, of course. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Helpful Commands
To find the version of the package if i install it i.e to find the version of the package before installing it
Commands:
apt policy nodejs #apt Manager
apt-cache policy nodejs # apt-get Manager