The aptitude command is a very useful, text-based utility for managing packages on your server. Some administrators use it as an alternative to apt, and it even has additional features that you won't find anywhere else. To get started, you'll need to install aptitude, if it isn't already:
sudo apt install aptitude
The most basic usage of aptitude allows you to perform functions you would normally be able to perform with apt. In the following table, I outline several example aptitude commands, as well as their apt equivalent (each one assumes sudo since you need root privileges to modify packages):
aptitude command |
apt equivalent |
aptitude install <packagename> |
apt install <packagename> |
aptitude remove <packagename> |
apt remove <packagename> |
aptitude search <search term> |
apt-cache search... |