For you who use Debian Linux or Ubuntu and its derivative such as Linux Mint, will surely know about Advanced Packaging Tool (APT) system. As you can guess from its name, apt is used as package management tool. The most popular command may be apt-get command. Generally, or at least apt-get is used to install or remove packages.
For example, the command to install mysql-server package using apt-get will be like this sudo apt-get install mysql-server
Apt is run as a command line form. For those who prefer an interface to apt system can use aptitude. Aptitude is run in console mode or terminal. For Graphical User Interface (GUI) version, there is a similar tool named Synaptic. We will show you about Aptitude.
Generally, aptitude is installed by default. If it is not, you can install it using apt-get command.
First, update the index packages files
sudo apt-get update
Then install aptitude
sudo apt-get install aptitude
You can run aptitude both in CLI mode or Interface mode. Running it without parameter will show you in Interface mode. Aptitude need root privileges, so you can run aptitude by typing sudo aptitude in your console.
To access the Menu, you can press Ctrl-T. Then you can move between menus using arrow button on your keyboard.
To install packages, you can browse the packages first. After you found the package(s) , select it then press + (plus sign) button. Press g button to preview the summary of package actions. To commit the installation press g button again.
You may see the state of the packages on the left the name of packages. Here’s a list of the packages state :
i : Installed package
c: Package not installed, but the configuration remains on the system
p : Purged from system
v : Virtual package
B : Broken package
u : Unpacked files, but files not yet configured
C : Half-configured - Configuration failed and require fix
H : Half-installed - Removal failed and require fix
In CLI mode you can use install parameter to install new package. Let say we want to install GIMP, then the command will be like :
sudo aptitude install gimp
To remove a package simply select a package then press - (minus sign) button. Press g button to view a summary of the activity. Press g button again to commit remove the package.
In CLI mode, you can use remove parameter to remove package. Let say we want to remove gedit application, then the command will be like :
sudo aptitude remove gedit
Update the package Index
To update the package index, simply press u botton.
Or type sudo aptitude update from console
To upgrade packages, press U button. It will mark all upgradable packages. Then press g button to view the summary of packages actions. Press g button again to commit the upgrade process.
In CLI mode there are 2 different way to upgrade package. Here there are :
Safe upgrade means aptitude will upgrade installed packages into the most recent version. The installed packages will not be removed until they are not used anymore. If you run safe-upgrade with no package name supplied then aptitude will upgrade every package that can be upgraded.
You can do it using
sudo aptitude safe-upgrade
Full-upgrade is similar with safe-upgrade. The difference is full-upgrade is less conservative that safe-upgrade. It may lead you to have unwanted actions. However full-upgrade can perform upgrade which safe-upgrade can not. In the apt-get tool, this is known as dist-upgrade parameter.
Here's the syntax
sudo aptitude full-upgrade
Why use Aptitude
Apt and Aptitude relies on the same system called dpkg. It’s similar with RPM on RedHat based Linux. But there are a few differences between Apt and Aptitude. Here are some the differences :
Of course there is still a lot of features that have not discussed here. You are always can type man aptitude or visit Aptitude User Manual to explore more detail.