aptitude
Manage Debian packages
TLDR
Synchronize list of packages and versions available. This should be run first, before running subsequent aptitude commands
Install a new package and its dependencies
Search for a package
Search for an installed package (?installed is an aptitude search term)
Remove a package and all packages depending on it
Upgrade installed packages to the newest available versions
Upgrade installed packages (like aptitude upgrade) including removing obsolete packages and installing additional packages to meet new package dependencies
Put an installed package on hold to prevent it from being automatically upgraded
SYNOPSIS
aptitude [options] [command] [pattern...]
PARAMETERS
-h, --help
Display usage summary and exit.
-V, --version
Print version information.
-y, --assume-yes
Non-interactively perform actions without prompts.
-q, --quiet
Reduce output verbosity (-qq for more quiet).
--assume-no
Assume no for all prompts (non-interactive decline).
-s, --simulate
Show what would be done without changes.
-D, --show-deps
Display dependencies when installing.
-t, --target-release RELEASE
Install from specific release (e.g., stable).
--without-recommends
Skip recommended packages.
--with-recommends
Include recommended packages (default).
-u
Update package lists and start interactive mode.
-v, --verbose
Increase output verbosity.
--full-resolver
Use complete dependency resolver.
--no-download
Skip downloading packages.
-f, --fix-broken
Fix broken dependencies automatically.
DESCRIPTION
Aptitude is a versatile, terminal-based front-end for the Debian package management system, combining features of apt-get and apt-cache with advanced capabilities. It excels in handling complex dependencies using a sophisticated solver, supports powerful regex-like search patterns, and offers an interactive curses-based full-screen interface launched by running aptitude without arguments.
Key features include safe-upgrade (keeps existing packages), full-upgrade (like dist-upgrade), automatic cleanup of obsolete packages, and tracking of auto-installed dependencies. In non-interactive mode, it supports commands like update, install, remove, search, show, why, and more. Users can simulate actions with -s, assume yes with -y, or limit to specific releases via -t.
Aptitude's resolver presents multiple solutions, allowing interactive selection, which is invaluable for resolving conflicts. It also integrates user tags for custom package management. While powerful, it's best for experienced users due to its opinionated resolver differing from apt. Ideal for servers, it's lighter than GUI tools like Synaptic.
CAVEATS
Resolver may suggest unexpected package removals; always review solutions. Slower than apt for simple tasks. Interactive mode requires terminal supporting curses.
INTERACTIVE MODE
Run aptitude alone for full-screen UI to browse, search, and manage packages.
SEARCH PATTERNS
Advanced syntax like ?installed, ?narrow(~npattern), ?broken for precise queries.
COMMANDS
Common: update, safe-upgrade, full-upgrade, install pkg, search ?name(pkg), why pkg.
HISTORY
Created by Daniel Burrows in 2004 during PhD research on dependency solving with SAT solvers. Integrated into Debian as an alternative to apt-get; actively maintained with features matching modern apt.


