Aptitude

From MEPIS Documentation Wiki

Jump to: navigation, search

Aptitude is a package manager, a front-end to the Advanced Packaging Tool (APT), that can be used instead of apt-get or Synaptic. Available from the repos (for documentation, install aptitude-doc-en)

Contents

Some advantages over apt-get

  • Solves dependencies in a smarter way
  • Cleans automatically when you remove a program by removing unneeded dependencies
  • Pins packages in a very simple way: aptitude hold packagename and aptitude unhold packagename unpins the package.
  • More complete options, it includes search, show, changelog, forbid-version options.
  • Offers a GUI way to manage packages, newer aptitude (currently in experimental) offers a GTK interface, the older version offers a menu based interface.

Installing

Aptitude doesn't come installed by default on MEPIS to install it, run as root:

apt-get install aptitude

Important: Before using it run first:

aptitude keep-all 

Do not use both apt-get and aptitude, stick with one of them, if you use apt-get you might need to run aptitude keep-all before you use aptitude to update, install, or remove packages.

Usage

It works in two modes, either as apt-get, by typing the command with options in konsole, for example:

aptitude update
aptitude safe-upgrade
aptitude full-upgrade
aptitude search programname
aptitude show programname
aptitude install programname
aptitude remove programname
aptitude purge programname

How to free disk space:

aptitude clean --purge-unused

Clean up config files:

aptitude search ~c

It will list all config files that are no longer needed.Then remove them with:

aptitude purge $(aptitude search ~c -F "%p")


It can also be used as a GUI that can be started by simply typing aptitude at the konsole prompt.

Where apt-get is a better choice

If you installed a .deb that doesn't have all the dependencies satisfied it's preferable you use:

apt-get -f install

to download and install dependencies rather than "aptitude -f install", if you do use "aptitude -f install" you might have to respond "n" to the first question because by default aptitude will try to remove the installed package rather than download dependencies.

GUI

This article or section is a stub. You can help Mepis Documentation Project by expanding it.

Key commands

  • Available when a group is selected
    • [ - Expand the currently selected group, and all its subgroups
    • ] - Collapse the currently selected group, and all its subgroups
    • Enter - Expand or collapse the currently selected group.
  • Available when a package is selected
    • d - view the package dependencies (packages that this package uses)
    • r - view the reverse dependencies (packages that use this package)
    • Shift-c - download and view the changelog
    • Enter - view information about the selected package
  • Available everywhere
    • u - update the package lists
    • j - move down one line
    • k - move up one line
    • q - retreat to the previous view (and exit aptitude if at the top view)

Navigation

The navigation keys (PageUp, Home, PageDown, etc.) work pretty much as expected.

You can navigate through the dependencies of the packages available to you by selecting a package that interests you and following its dependencies or reverse dependencies. Repeat as desired.

Package Management

Aptitude provides straightforward package managment, and gui of the available actions (combined with apt-pinning,)

  1. aptitude hold packagename

To unpin use

  1. aptitude unhold packagename

and will help you manage unusual repositories, such as testing and unstable.

Most common actions on a package

  • + (plus) mark package for installation
  • - (minus) mark package for removal
  • _ (underscore) mark package for purging
  • = (equals sign) mark package as held

Committing your actions

  • Press g once to view the marked actions
  • Press g a second time to act

Searching for packages

  • / - (forward slash) search forward for search term or partial package name
  • \ - (back slash) search backwards for search term or partial package name
  • l - (lower case L) limit the view to packages matching the search expression.

Useful search terms

  • ~b - matches broken packages
  • ~c - matches partially uninstalled packages ('configured, but not installed')
  • ~ahold - matches held packages
  • ~dtext - searches descriptions for text

NOTE: ~ is a tilde (ASCII character 126). It's sometimes called a "twiddle" or a "squiggle."

Links

Personal tools
In other languages