LinuxCommandLibrary

aptitude

TLDR

Synchronize list of packages and versions

$ sudo aptitude update
copy
Install a new package
$ sudo aptitude install [package]
copy
Search for a package
$ aptitude search [package]
copy
Search for an installed package
$ aptitude search '?installed([package])'
copy
Remove a package and all packages depending on it
$ sudo aptitude remove [package]
copy
Upgrade installed packages
$ sudo aptitude upgrade
copy
Full upgrade including removing obsolete packages
$ sudo aptitude full-upgrade
copy
Hold a package to prevent automatic upgrades
$ sudo aptitude hold '?installed([package])'
copy

SYNOPSIS

aptitude [options] command [arguments]

DESCRIPTION

aptitude is a powerful package management utility for Debian and Ubuntu systems. It provides both a command-line interface and an interactive ncurses-based interface with advanced dependency resolution and search capabilities.

PARAMETERS

update

Synchronize package index files from sources
install package
Install or upgrade specified packages
remove package
Remove packages and dependent packages
purge package
Remove packages, configurations, and dependent packages
upgrade
Upgrade installed packages to newest versions
full-upgrade
Upgrade packages, removing obsolete ones as needed
search pattern
Search for packages matching pattern
show package
Display detailed package information
hold package
Prevent package from being upgraded
unhold package
Allow package to be upgraded
safe-upgrade
Upgrade packages conservatively
clean
Remove downloaded package files
autoclean
Remove old downloaded package files

CAVEATS

Aptitude uses its own search syntax with special terms like ?installed, ?automatic, etc. Different from apt-cache search syntax.

HISTORY

Created as an alternative to apt-get with more advanced features. First released for Debian in 2001 by Daniel Burrows.

SEE ALSO

apt(8), apt-get(8), dpkg(1)

Copied to clipboard