aptitude
Advanced package management with dependency resolution
TLDR
Synchronize list of packages and versions
$ sudo aptitude update
Install a new package$ sudo aptitude install [package]
Search for a package$ aptitude search [package]
Search for an installed package$ aptitude search '?installed([package])'
Remove a package and all packages depending on it$ sudo aptitude remove [package]
Upgrade installed packages$ sudo aptitude upgrade
Full upgrade including removing obsolete packages$ sudo aptitude full-upgrade
Simulate an install without making changes$ sudo aptitude install -s [package]
Show why a package is installed$ aptitude why [package]
Hold a package to prevent automatic upgrades$ sudo aptitude hold '?installed([package])'
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
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.
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.

