Wednesday, 20 November 2013

APT is the acronym of Advanced Packaging Tool and it is the utility mainly used for installing, removing, updating and upgrading the packages on Debian operating system and it’s derivatives such as Ubuntu and Linux Mint. We have already studied Package management in Debian using apt-get and apt-cache commands, both of which (or at least apt-get) are well-known commands for the users of Debian based operating system.

Apt, whether it is apt-get or apt-cache, is normally CLI based utility. If you prefer to use graphical environment (GUI), Aptitude is for you. The beauty of Aptitude is that, it can be used both in CLI mode and GUI mode. If it is run without any parameter/argument, it can be operated in GUI mode, CLI mode use of Aptitude is similar to that of apt-get command. There is an alternative to Aptitude if you are more comfortable with GUI mode, it is known as Synaptic. We will limit our discussion up to Aptitude and this article will help you understanding the basic use of Aptitude in GUI mode as well as CLI mode.

Before we move to the tutorial part, make sure that aptitude is installed in your system. If it isn't you can run following command to install aptitude in your system:

sudo apt-get install aptitude

Let's start!

Aptitude : Basic Usage

As mentioned earlier, aptitude can be used both in CLI mode as well as GUI mode. In both the modes, you need to have root privileges to run aptitude. When it is run without any parameters, it will be directed to work in GUI mode.

For example :

sudo aptitude

Aptitude Screen

To have an access to the menus, you will have to press Ctrl+T and in order to navigate through the menu, use arrow keys.

Aptitude Menu

Installing the Packages

GUI Mode

To install the packages, you can browse the list of available packages. Press the '+' (plus) key when you find any suitable package. Pressing 'g' key will display the package information. Pressing 'g' key again will start the installation.

When package information is displayed, the state of the package is displayed using a sign convention (with the use of alphabets). Here is the list of those alphabets and their significance:

i : Package is already installed

c : Package is not installed, but configuration is present on the system

p : Purged

v : Virtual package

B : Broken package

u : Unpacked files

C : Half-configured, Configuration failed and requires a fix

H : Half-installed, Removal failed and require a fix

CLI Mode

If you are familiar with the use of apt-get, you will be comfortable with the CLI mode use of aptitude. Let's have a look over syntax of CLI mode use of aptitude:

Syntax:

sudo aptitude install [Package-Name]

Example:

sudo aptitude install wireshark

Very simple!

Removing the Packages

GUI Mode

We have used '+' (plus) key to install a package, so logically, just make a guess, which key would you use to remove a package?