aptitude
Advanced package management with dependency resolution
TLDR
Launch the full-screen interactive package browser
$ aptitude
Refresh the package lists$ sudo aptitude update
Search by name using aptitude's own pattern language$ aptitude search '~n[keyword]'
Find packages that are installed but no longer in any repository$ aptitude search '~o'
Show the full record for one package$ aptitude show [package]
Preview an installation without changing anything$ sudo aptitude -s install [package]
Apply only the upgrades that install or remove nothing else$ sudo aptitude safe-upgrade
Upgrade everything, allowing dependency changes$ sudo aptitude full-upgrade
Explain why a package is on the system$ aptitude why [package]
Explain why a package cannot be installed$ aptitude why-not [package]
Pin a package at its current version$ sudo aptitude hold [package]
Purge configuration files left behind by removed packages$ sudo aptitude purge '~c'
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 sourcesinstall package
Install or upgrade specified packagesremove package
Remove packages and dependent packagespurge package
Remove packages, configurations, and dependent packagesupgrade
Upgrade installed packages to newest versionsfull-upgrade
Upgrade packages, removing obsolete ones as neededsearch pattern
Search for packages matching patternshow package
Display detailed package informationhold package
Prevent package from being upgradedunhold package
Allow package to be upgradedsafe-upgrade
Upgrade packages conservativelyclean
Remove downloaded package filesautoclean
Remove old downloaded package fileswhy package
Explain why a package is installed or requiredwhy-not package
Explain why a package cannot be installeddownload package
Download .deb file without installingreinstall package
Reinstall an already-installed packageversions package
List available versions of a packageforbid-version package
Prevent upgrade to a specific package versionmarkauto package
Mark package as automatically installedunmarkauto package
Mark package as manually installed-s, --simulate
Preview changes without applying them-y, --assume-yes
Skip confirmation prompts-D, --show-deps
Show explanations for automatic installations and removals-V, --show-versions
Display package version details in listings-P, --prompt
Always display a confirmation prompt before changes-R, --without-recommends
Do not treat recommended packages as dependencies-t release
Set the target release for package installation-q, --quiet
Suppress progress indicatorschangelog package
Download and display the changelog for a package
CONFIGURATION
~/.aptitude/config
User-specific aptitude configuration./etc/apt/apt.conf
APT configuration shared with apt and apt-get./etc/apt/apt.conf.d/
Directory for additional APT configuration fragments.
INSTALL
sudo apt install aptitude
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.
