Like Apt-get, Aptitude is the most powerful package management tool in Debian and its derivative systems. Unlike Apt-get, aptitude is better at dealing with dependency issues. For example, when aptitude deletes a package, it also deletes the packages it depends on. This way, the system will not be left with useless packets, the whole system is cleaner.
For example: If you use the sudo apt-get install Libncurses5-dev command, the following problems may occur:
"The following packages have dependencies that are not satisfied:
Libncurses5-dev: dependent: libncurses5 (= 5.6+20071124-1UBUNTU2) But 5.7+20090207-1UBUNTU1 is going to be installed
E: Unable to install the package "
Can be replaced with aptitude install can be installed successfully.
It's important to note that Apt-get and aptitude don't mix, because they don't know what's going on in between.
Here are some common aptitude commands.
Command |
Role |
Aptitude Update |
Update the list of available packages |
Aptitude Upgrade |
Upgrade the available packages |
Aptitude Dist-upgrade |
Upgrade your system to a new release |
Aptitude Install Pkgname |
Install package |
Aptitude Remove Pkgname |
Delete Package |
Aptitude Purge Pkgname |
To delete a package and its configuration files |
Aptitude search String |
Search Packages |
Aptitude Show Pkgname |
Display Package Details |
Aptitude Clean |
To delete a downloaded package file |
Aptitude AutoClean |
Delete Expired package files only |
|
Of course, you can also use aptitude in text interface mode.
Ubuntu-> Package Management->aptitude