aptitude in Ubuntu

Introduction

aptitude is a text interface for the Debian GNU/Linux package system.

It lets the user browse the list of packages and perform package management tasks such as installing, upgrading and removing packages.

Actions can be performed from the visual interface or from the command line.

Installation

To install aptitude in Ubuntu, run

sudo apt install aptitude

Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: aptitude-common libcgi-fast-perl libcgi-pm-perl libclass-accessor-perl libcwidget4 libfcgi-perl libio-string-perl libparse-debianchangelog-perl libsub-name-perl libxapian30 Suggested packages: aptitude-doc-en | aptitude-doc apt-xapian-index debtags tasksel libcwidget-dev libhtml-template-perl libxml-simple-perl xapian-tools The following NEW packages will be installed: aptitude aptitude-common libcgi-fast-perl libcgi-pm-perl libclass-accessor-perl libcwidget4 libfcgi-perl libio-string-perl libparse-debianchangelog-perl libsub-name-perl libxapian30 0 upgraded, 11 newly installed, 0 to remove and 29 not upgraded. Need to get 4,325 kB of archives. After this operation, 19.9 MB of additional disk space will be used. Get:1 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 aptitude-common all 0.8.12-1ubuntu4 [1,711 kB] Get:2 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 libcwidget4 amd64 0.5.18-5build1 [306 kB] Get:3 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 libxapian30 amd64 1.4.14-2 [661 kB] Get:4 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 aptitude amd64 0.8.12-1ubuntu4 [1,323 kB] Get:5 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 libcgi-pm-perl all 4.46-1 [186 kB] Get:6 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 libfcgi-perl amd64 0.79-1 [33.1 kB] Get:7 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 libcgi-fast-perl all 1:2.15-1 [10.5 kB] Get:8 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 libsub-name-perl amd64 0.26-1 [11.5 kB] Get:9 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 libclass-accessor-perl all 0.51-1 [21.2 kB] Get:10 http://fi.archive.ubuntu.com/ubuntu focal/main amd64 libio-string-perl all 1.08-3 [11.1 kB] Get:11 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 libparse-debianchangelog-perl all 1.2.0-13 [49.7 kB] Fetched 4,325 kB in 0s (9,203 kB/s) Selecting previously unselected package aptitude-common. (Reading database ... 445850 files and directories currently installed.) Preparing to unpack .../00-aptitude-common_0.8.12-1ubuntu4_all.deb ... Unpacking aptitude-common (0.8.12-1ubuntu4) ... Selecting previously unselected package libcwidget4:amd64. Preparing to unpack .../01-libcwidget4_0.5.18-5build1_amd64.deb ... Unpacking libcwidget4:amd64 (0.5.18-5build1) ... Selecting previously unselected package libxapian30:amd64. Preparing to unpack .../02-libxapian30_1.4.14-2_amd64.deb ... Unpacking libxapian30:amd64 (1.4.14-2) ... Selecting previously unselected package aptitude. Preparing to unpack .../03-aptitude_0.8.12-1ubuntu4_amd64.deb ... Unpacking aptitude (0.8.12-1ubuntu4) ... Selecting previously unselected package libcgi-pm-perl. Preparing to unpack .../04-libcgi-pm-perl_4.46-1_all.deb ... Unpacking libcgi-pm-perl (4.46-1) ... Selecting previously unselected package libfcgi-perl. Preparing to unpack .../05-libfcgi-perl_0.79-1_amd64.deb ... Unpacking libfcgi-perl (0.79-1) ... Selecting previously unselected package libcgi-fast-perl. Preparing to unpack .../06-libcgi-fast-perl_1%3a2.15-1_all.deb ... Unpacking libcgi-fast-perl (1:2.15-1) ... Selecting previously unselected package libsub-name-perl. Preparing to unpack .../07-libsub-name-perl_0.26-1_amd64.deb ... Unpacking libsub-name-perl (0.26-1) ... Selecting previously unselected package libclass-accessor-perl. Preparing to unpack .../08-libclass-accessor-perl_0.51-1_all.deb ... Unpacking libclass-accessor-perl (0.51-1) ... Selecting previously unselected package libio-string-perl. Preparing to unpack .../09-libio-string-perl_1.08-3_all.deb ... Unpacking libio-string-perl (1.08-3) ... Selecting previously unselected package libparse-debianchangelog-perl. Preparing to unpack .../10-libparse-debianchangelog-perl_1.2.0-13_all.deb ... Unpacking libparse-debianchangelog-perl (1.2.0-13) ... Setting up libxapian30:amd64 (1.4.14-2) ... Setting up libcgi-pm-perl (4.46-1) ... Setting up libio-string-perl (1.08-3) ... Setting up libcwidget4:amd64 (0.5.18-5build1) ... Setting up aptitude-common (0.8.12-1ubuntu4) ... Setting up aptitude (0.8.12-1ubuntu4) ... update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode Setting up libsub-name-perl (0.26-1) ... Setting up libfcgi-perl (0.79-1) ... Setting up libclass-accessor-perl (0.51-1) ... Setting up libcgi-fast-perl (1:2.15-1) ... Setting up libparse-debianchangelog-perl (1.2.0-13) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

Differences between apt and aptitude

By example

apt search "?name(^bind)"

E: Regex compilation error

aptitude search "?name(^bind)"

p bind9 - Internet Domain Name Server p bind9:i386 - Internet Domain Name Server i A bind9-dnsutils - Clients provided with BIND 9 p bind9-dnsutils:i386 - Clients provided with BIND 9 p bind9-doc - Documentation for BIND 9 p bind9-dyndb-ldap - LDAP back-end plug-in for BIND i A bind9-host - DNS Lookup Utility p bind9-host:i386 - DNS Lookup Utility i A bind9-libs - Shared Libraries used by BIND 9 p bind9-libs:i386 - Shared Libraries used by BIND 9 p bind9-utils - Utilities for BIND 9 p bind9-utils:i386 - Utilities for BIND 9 p bind9utils - Transitional package for bind9-utils v bind9utils:i386 - p bindechexascii - simple ASCII,binary,decimal and hex conver p bindfs - mirrors or overlays a local directory with p bindgraph - DNS statistics RRDtool frontend for BIND9

Article author: Andrei Olegovich