In this article, I am going over the aptitude command and explaining all of the commands and usage that goes with its usage.
Install Aptitude
Run the following command to install aptitude and task select: sudo apt install aptitude tasksel
Why Aptitude?
Aptitude provides greater dependency resolution and wildcard installations. Making installing or reinstalling entire packages far easier. For instance the following command installs KDE in a simple command: aptitude install ~t^desktop$ ~t^kde-desktop$
aptitude install
install one or more packages:
sudo aptitude install gedit
remove a package
sudo aptitude install gedit
purge a package
sudo aptitude install gedit_
hold a package at its current version
sudo aptitude install gedit=
build dependencies for a package
sudo aptitude install gedit&BD
aptitude remove, purge, reinstall
These are the same as using the above commands under install, however, you can utilizing these independent commands with wildcards like below
sudo aptitude purge ^kde-desktop$
aptitude hold, unhold, keep
hold is the same as the install, but again I like to use this long hand version when utilizing wildcards.
unhold – is a great way to release held packages
keep – I DO NOT USE because it merely cancelled scheduled tasks for that package… only it will continue to be upgraded later.
aptitude update, safe-upgrade, full-upgrade
update – updates the cache
safe-upgrade – upgrades all packages but will not remove unused packages
full-upgrade – upgrades all packages but WILL remove unused packages
aptitude search
search – searches for the package, these search results can use wildcards, be sorted, and culled as needed using various options
search examples:
Search for packaged installed from outside stable repo