What Is aptitude And How To Use It?

What Is aptitude And How To Use It?

I already discussed briefly about Aptitude which is a debian package manager. In this article, we will see it in more detail and also we will discuss how can we use it in different modes, i.e. interactive and command-line mode.

Aptitude is a high-level interface to the package manager that is used in Debian based Linux distributions. It provides a text-based menu that displays a list of packages and allows a user to perform package management tasks such as installation, removal, and up-gradation of packages. Actions are performed from a visual terminal-based menu by using a single key command.

Some useful features of aptitude

  • Apart from the terminal-based menu, it can be also used in command-line mode. For example, to install a package you can use $sudo aptitude install package_name
  • You can preview an action that is about to be taken different color marking is used for different actions
  • It has the ability to interactively retrieve and display the changelog of all available official packages
  • You can mark a package as automatically or manually installed so that packages can be auto removed if no longer required
  • It has score based dependency resolver which is more suitable for interactive dependency resolution

What is Aptitude interactive mode?

In this mode, a list of upgradable, installed or not installed packages is displayed as the menu in the terminal. To use aptitude in interactive mode, use the following command in your terminal –


Now terminal menu will look something like this –

After running it you can use the following keys –

  • Ctrl+t to access the menu
  • Use ? for help
  • q to quit or close the current opening window
  • Up, down, right and left keys to navigate
  • Use key to preview, install or remove a package
  • The Enter key used to select or open or close a single level in the current window
  • Use / and \ for forward and backward searching of a package
  • To open and close level recursively [ or ] keys are used

If you do not run aptitude command with superuser privileges then before performing an action like installation or removal of a package it may prompt you to switch to the root user. You should confirm it if you want to perform such actions.

What is Aptitude command-line mode?

You can use aptitude also in command-line mode just like we use apt or apt-get. The following are some aptitude commands that you can use. You should either use these commands with superuser privileges or switch to root user and then execute them-

To install a package –
aptitude install package-name

To uninstall or remove a package –
aptitude remove package-name

Use the following command to remove a package along with its dependensies-
aptitude purge package-name

To update the package list or apt’s database-
aptitude update

To upgrade the packages safely use the following command
aptitude safe-upgrade

Use the following command to search a package in Linux. It will list all the packages that match with the pattern
aptitude search package-name

To display the details of an installed package in your system use the following command
aptitude show package-name

Look at the screenshot below it shows use of aptitude in command-line mode-


aptitude vs apt-get

Aptitude and apt-get both are high-level interface to package manager in Debian and its derivatives. The most obvious difference between these two is that aptitude provides a terminal menu interface while apt-get does not. If you only consider the command-line interface of each then both are quite similar to each other. Some minor difference are given below-

  • Few commands are different like upgrade and dist-upgrade are renamed in the aptitude to probably more accurate names that are safe-upgrade and full-upgrade respectively
  • aptitude performs functions of not only apt-get but some other similar tools like apt-cache, apt-mark, etc
  • aptitude has slightly different query syntax for searching for a package from apt-cache. The aptitude search result may contain a little bit more information.
  • aptitude can suggest several potential resolutions while performing an action like installation, removal or up-gradation of a package But this feature is not available in apt-get


Previous How to Find Exact Name of A Package by Using apt-cache in Linux?
Next How to Configure Sudo to run Without Password or Password-less

About author

You might also like

Linux Topics 2 Comments

How to Create a USB Bootable Ubuntu Live Disk

Looking to make a Live Ubuntu USB disk? then you have arrived at the right place. Here I will provide you direct download link to the Ubuntu ISO image, Linux

Linux Topics 0 Comments

How to Find and Reduce Boot Time in Linux

When you power on a Linux system it initializes different services and run different processes. The whole process can take some time that may vary from a few seconds to

Linux Topics 0 Comments

How to Copy Directory in Linux / Unix

If you are looking to copy a directory in Linux using a command line, then here I have explained what command to use to copy a folder in Linux or


No Comments Yet!

You can be first to comment this post!

Leave a Reply