Wednesday, 20 November 2013

Aptitude : Package Management in Debian Based Operating Systems

linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial,


    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

linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial,
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. 

linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial, linux-aptitude-tutorial,
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?

Yes, it's '–' (minus) key. Hit the minus key, press 'g' key to view the information and press the 'g' key again to begin the removal process.



CLI Mode

Not saying much on this.

Syntax:

sudo aptitude remove [Package-Name]

Example:

sudo aptitude remove iptables

Updating the Packages

GUI Mode

Use the 'u' key to start updating the package index.



CLI Mode

sudo aptitude update

Upgrading the Packages

GUI Mode

Press the 'U' key and it will show you all the upgradable packages. Press 'g' key to view the summary of the action, press the 'g' key again to start the upgrade process.



CLI Mode

In CLI Mode, you can upgrade the packages in two different ways.

1. Safe Upgrade: In safe upgrade, installed packages will be upgraded to their latest version. If no package is specified for the sage upgrade, it will start upgrading every package.

sudo aptitude safe-upgrade

2. Full Upgrade: Full upgrade is similar to safe upgrade, but full upgrade may perform upgrade on unwanted packages. It is very much similar to 'dist-upgrade' in apt-get.

sudo aptitude full-upgrade

Why Aptitude..?

  • Aptitude = apt-get + apt-cache + apt-mark.
  • Aptitude removes all the unused dependencies whenever any package is removed.
  • Aptitude consists of a resolver function that gives us suggestions when a conflict occurs while installing, removing or upgrading a package.
  • Aptitude keeps us aware of the obsolete software by enlisting them under 'Obsolete and Locally Created Packages'.
  • Aptitude contains a download parameter that downloads a package into .deb file.

1 comment:

  1. To see all installed packages:

    dpkg --get-selections

    ReplyDelete

    Total Pageviews