aptitude is a featureful package manager for Debian GNU/Linux systems, based on the renowned apt package management infrastructure. aptitude provides the functionality of dselect and apt-get, as well as many additional features not found in either program.
For the package management operation which involves package installation or updates package metadata, you need to have root privilege.
Here are basic package management operations with commandline using aptitude(8).
Working With aptitude
Update package archive metadata.
Install candidate version of “foo” package with its dependencies.
Install candidate version of installed packages without removing any other packages.
Install candidate version of installed packages while removing other packages if needed.
The difference between “safe-upgrade”/”upgrade” and “full-upgrade”/”dist-upgrade” only appears when new versions of packages stand in different dependency relationships from old versions of those packages. The “aptitude safe-upgrade” command does not install new packages nor remove installed packages.
Remove “foo” package while leaving its configuration files.
Remove “foo” package and its configuration files.
Clear out the local repository of retrieved package files completely.
Clear out the local repository of retrieved package files for outdated packages.
Display detailed information about “foo” package.
Search packages which match ‘regex’.
Explain the reason why ‘regex’ matching packages should be installed.
Explain the reason why ‘regex’ matching packages can not be installed.
Notable command options for aptitude
-s simulate the result of the command
-d download only but no install/upgrade
-D show brief explanations before the automatic installations and removals
List of the aptitude regex formula
~n match on package name
~d match on description
~t match on task name
~G match on debtag
~m match on maintainer
~s match on package section
~V match on package version
~A{sarge,etch,sid} match archive
~O{debian,…} match origin
~p{extra,important,optional,required,standard} match priority
~E match essential packages
~v match virtual packages
~N match new packages
~a{install,upgrade,downgrade,remove,purge,hold,keep} match with pending action
~i match installed packages
~M match installed packages with A-mark (auto installed package)
~i!~M match installed packages without A-mark (administrator selected package)
~U match installed and upgradable packages
~c match removed but not purged packages
~g match removed, purged or can-be-removed packages
~b match packages with broken relation
~B match packages with broken depends/predepends/conflict
~D[:] match packages from which relation is defined to package
~DB[:] match packages from which broken relation is defined to package
~R[:] match packages to which the package defines relation
~RB[:] match packages to which the package defines broken relation
~R~i match packages to which some other installed packages depend on
!~R~i match packages to which no other installed packages depend on
~R~i|~Rrecommends:~i match packages to which some other installed packages depend or recommend on
~S filter match package with filtered version
~T match all packages (true)
~F match no packages (false)
Recent Comments