This is an excerpt from the Debian Reference manual.
2.2. Basic package management operations
Basic package management operations on the Debian system can be performed by any package management tools available on the Debian system. Here, we explain basic package management tools: apt-get / apt-cache and aptitude.
For the package management operation which involves package installation or updates package metadata, you need to have root privilege.
2.2.1. apt-get / apt-cache vs. aptitude
The apt-get and apt-cache commands are the most basic package management tool.
- apt-get and apt-cache offer only the commandline user interface.
- apt-get is most suitable for the major system upgrade between releases, etc.
- apt-get offers a robust and stable package resolver which uses the common package state data.
- apt-get is less demanding on hardware resources. It consumes less memory and runs faster.
- apt-get has been updated to support autoinstall and autoremove of recommended packages.
- apt-get has been updated to support logging of package activities.
- apt-cache offers a standard regex based search on the package name and description.
- apt-get and apt-cache can manage multiple versions of packages using /etc/apt/preferences but it is quite cumbersome.
The aptitude command is the most versatile
package management tool.
- aptitude offers the fullscreen interactive text user interface.
- aptitude offers the commandline user interface, too.
- aptitude is most suitable for the daily interactive package management such as inspecting installed packages and searching available packages.
- aptitude is more demanding on hardware resources. It consumes more memory and runs slower.
- aptitude offers an enhanced package resolver which also uses an extra package state data used only by aptitude.
- aptitude supports autoinstall and autoremove of recommended packages.
- aptitude supports logging of package activities.
- aptitude offers an enhanced regex based search on all of the package metadata.
- aptitude can manage multiple versions of packages without using /etc/apt/preferences and it is quite intuitive.
Note Although the aptitude command comes with rich features such as its enhanced package resolver, this complexity has caused (or may still causes) some regressions such as Bug #411123
, Bug #514930
, and Bug #570377
. In case of doubt, please use the apt-get and apt-cache commands over the aptitude command.