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 [package...]
aptitude [options]Common commands include:
update
upgrade
full-upgrade (or dist-upgrade)
install package[=version]...
remove package...
purge package...
hold package...
unhold package...
markauto package...
unmarkauto package...
show package...
search pattern...
clean
autoclean
PARAMETERS
command
The action aptitude should perform. Examples include install, remove, update, search, upgrade, etc.
package
The name of the package(s) to operate on. Wildcards and regular expressions can sometimes be used.
-y, --assume-yes
Automatically answer yes to prompts, useful for scripting.
-s, --simulate
Perform a 'dry run' operation, showing what would happen without actually making changes.
-v, --verbose
Increase the verbosity of output. Can be specified multiple times.
-D, --show-deps
Show the dependencies that are automatically installed/removed.
-R, --with-recommends
Consider recommended packages as dependencies (default behavior for install).
-r, --without-recommends
Do not consider recommended packages as dependencies.
-P, --with-suggests
Consider suggested packages as dependencies.
-t release, --target-release release
Set the target release or distribution for package operations (e.g., stable, testing, unstable).
-F format, --display-format format
Specify the output format for search and show commands.
-O option, --option option
Set a configuration option (e.g., APT::Get::Assume-Yes=true).
DESCRIPTION
aptitude is a versatile and robust package manager for Debian-based Linux distributions, including Ubuntu. It serves as a high-level interface to the APT system, offering both a traditional command-line interface and a powerful, interactive text-based user interface (TUI) based on Ncurses.
While apt has become the default modern frontend for APT, aptitude remains a favored choice for many users due to its sophisticated dependency resolution algorithm, which is often considered more capable of handling complex dependency conflicts than its counterparts. It can intelligently propose solutions for broken dependencies and track packages installed automatically, facilitating their eventual removal.
Beyond basic installation and removal, aptitude provides extensive search capabilities, allowing users to find packages by name, description, or even complex search patterns. It also supports operations like upgrading the system, holding packages to prevent upgrades, marking packages as manually or automatically installed, and showing detailed information about packages. Its interactive mode, invoked by simply running aptitude without arguments, offers a visual way to browse, select, and manage packages, complete with dependency views and conflict resolution.
CAVEATS
While powerful, aptitude's dependency resolver can sometimes be overly aggressive in proposing solutions, which might surprise users accustomed to apt or apt-get's behavior. Its interactive interface, though feature-rich, can have a steeper learning curve for new users. For simple day-to-day package management, apt is often considered more straightforward and is the default for many modern distributions.
INTERACTIVE MODE
When invoked without any commands or arguments (e.g., just aptitude), it launches a full-screen, text-based interactive interface. This mode allows users to visually browse available packages, mark them for installation or removal, review proposed changes, and resolve dependency conflicts interactively. It provides a powerful alternative to command-line operations for complex package management tasks.
DEPENDENCY RESOLUTION
One of aptitude's most acclaimed features is its sophisticated dependency resolver. Unlike apt-get, which might refuse to proceed with broken dependencies, aptitude attempts to find a solution, even if it means suggesting the removal of conflicting packages or downgrading certain components. This makes it particularly useful for managing systems with complex or non-standard package configurations.
HISTORY
aptitude was developed as a more feature-rich and user-friendly alternative to apt-get and apt-cache, aiming to combine their functionalities under a single, cohesive interface. It was particularly distinguished by its interactive Ncurses interface and its advanced dependency resolution capabilities, which often provided more intelligent solutions to complex dependency issues. Although apt has become the preferred command-line frontend for APT since its introduction around 2014, aptitude continues to be actively maintained and used by many Debian and Ubuntu power users for its unique strengths, especially its robust dependency solver and interactive mode.