An Ncurses and command-line front-end for package management. For basic usage, see AptCLI. For package management generally, see PackageManagement.

Contents

  1. Interactive Use
  2. Advanced search patterns
  3. See Also

Aptitude has a number of useful features, including:

  • a mutt-like syntax for matching packages

  • preview actions about to be taken with different colors marking different actions
  • persistence of user actions (similar to dselect)

  • interactively retrieve and display the Debian changelog for packages
  • apt-like command line mode (aptitude install foo)

  • score-based dependency resolver is more suitable for interactive dependency resolution
    • lets you add hints like "keep this part of the solution" or "drop that part of the solution"

Interactive Use

To run interactively, enter the following from a terminal emulator:

aptitude

After running it, use:

  • F10 or Ctrl-T to access the menu.

  • ? for help

  • The up, down, left, right keys to navigate.

  • The Enter key to select or open and close a single level

  • The bracket keys ([ and ]) to open and close levels recursively

  • The + or - key to install/update or remove a package

  • The g key to preview/confirm actions

  • q to quit – this also closes the currently open window (g goes forward, q goes back)

  • Forward and backward slash (/ and \) for searching forward or backward.

When reviewing dependency resolutions (shown after pressing e), press:

  • cursor keys or vi-style j/k keys to select actions or action groups

  • a to explicitly insist on an action (use again to go back to no specific decision)

  • r to reject an action (use again to go back to no specific decision)

  • dot (.) to show the next proposed dependency resolution

  • comma (,) to show the previous proposed dependency resolution

  • exclamation mark (!) to accept the currently shown dependency resolution

When reviewing pending actions, press:

  • g again to go ahead and execute the pending actions

  • q to go back to the previous view

See Accessing package information to understand the letters in the package synopsis line (e.g., i means "will be installed", p means "not installed", etc.)

The most common way to use aptitude is:

  1. run aptitude

  2. press u to update the lists of available packages

  3. press U to mark all upgradable packages to be upgraded

  4. optionally search/select some packages to install
  5. press g to see the pending actions and modify them if needed

  6. press g again to start the download

{i} When you need to resolve conflicts, but you discover that you made a mistake; use Actions > Cancel pending actions to start again.

Advanced search patterns

Look for packages installed from anything other than stable:

aptitude search '?narrow(?installed, !?archive(stable))'

Look for packages installed from testing (assuming you have sources lists with stable and testing repositories):

aptitude search '?narrow(?installed, ?archive(testing) !?archive(stable))'

List contrib, non-free, or non-free-firmware packages installed:

aptitude search '~i ?section(non-free)'
aptitude search '~i ?section(contrib)'
aptitude search '~i ?section(non-free-firmware)'

For more information about searching, see the aptitude search term reference

See Also

and ... apt.conf, preferences, sources.list, Aptitude::Parse-Description-Bullets=true, AptitudeTodo

Other content

This page used to be much longer - general information about managing packages on the command line has been moved to AptCLI, while abstract guidance about package managers has been moved to DebianPackageManagement.


CategoryPackageManagement | CategorySoftware

AltStyle によって変換されたページ (->オリジナル) /