Differences between revisions 15 and 64 (spanning 49 versions)
Revision 15 as of 2006-12-12 08:31:28
Size: 2753
Comment: added some more informations
Revision 64 as of 2017-08-17 08:16:30
Size: 7551
Editor: TedMarynicz
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from aptitude
Aptitude is a ["Ncurses"] based ["FrontEnd"] to ["Apt"], the debian package manager. Since it is text based, it is ran from a terminal or a CLI (command line interface). Aptitude has a number of useful features, including:
#language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[es/Aptitude|Español]] - [[fr/Aptitude|Français]] - [[ru/Aptitude|Русский]] - [[it/Aptitude|Italiano]]- [[zh_CN/Aptitude|简体中文]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]||
----
## If your page gets really long, uncomment this Table of Contents
<<TableOfContents(2)>>

== Introduction ==

Aptitude is an [[Ncurses]] based WikiPedia:FrontEnd to [[Apt]], the debian package manager. Since it is text based, it is run from a terminal or a CLI (command line interface). Aptitude has a number of useful features, including:
Line 9: Line 16:
 * ["AptCLI"]-like (= apt-get + apt-cache) command line mode ("aptitude install foo")  * [[AptCLI]]-like (= apt-get + apt-cache) command line mode ("aptitude install foo")
 * Score-based and (usually) smarter dependency resolver than apt-get
Line 11: Line 19:
aptitude is also Y2K-compliant, non-fattening, naturally cleansing, and housebroken. The name of its primary command is `aptitude`, as is the name of its primary [[DebianPkg:aptitude|Debian package]]. The manual for the latest `aptitude` version is usually available [[http://aptitude.alioth.debian.org/doc/en/|here (in English)]]. If you have package=[[DebianPkg:aptitude-doc-en]] installed (other [[https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=aptitude-doc|languages are available]]), you can find an HTML manual for your current version [[file:///usr/share/doc/aptitude/html/en/index.html|here]] (change path for other languages as appropriate).
Line 13: Line 21:
== Run ==

Enter the following from a ["terminal"]:
== Interactive Use ==
To run interactively, enter the following from a [[terminal]]:
Line 20: Line 27:
== Use ==
After running it, utilize: 
After running it, use:
Line 23: Line 29:
 * F10 to access to the menu and use aptitude. This is the main key.
 * ? for help
 * The 'up', 'down', 'left', 'right' to navigate.
 * The 'Enter' key, to select
 * 'q' to quit
 * F10 to access the menu and use aptitude. This is the main key.
 * ? for help
 * The 'up', 'down', 'left', 'right' keys to navigate.
 * The 'Enter' key to select
 * 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)
 
The common use of aptitude in TUI (text user interface) is; run aptitude; press 'u' (update the lists of available packages); press 'U' (Mark all upgradable packages to be upgraded); (search/select some stuff to install, is optional); press 'g' (to see the pending actions and modify if needed); press 'g' (again, to start the download).
Line 29: Line 39:
The common use of aptitude in TUI is; run aptitude; press 'u' (update the lists of available packages); press 'U' (Mark all upgradable packages to be upgraded); (search/select some stuff to install, is optional); press 'g' (to see the pending actions and modify if needed), press 'g' (again, to start the download). Some time when you need to resolve conflicts, you discover that you made a mistake; you can easily use 'Cancel pending actions' in the 'Actions' menu so that you can re-select.
Line 31: Line 41:
Some time when you need to resolve conflicts, you discover that you did an bad choice; you want may be easy 'Cancel pending actions' in the 'Actions' menu, so that you easy can retry. When reviewing pending actions:
 * 'a' explicitly accepts an action (use again to unaccept)
 * 'r' rejects an action
 * 'g' again goes ahead with pending actions
Line 33: Line 46:
You can also use aptitude like you was used to use apt-get: See [[http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s02s02.html|Accessing package information]] for understanding the letters in the package synopsis line (e.g., 'i' means "will be installed", 'p' means "not installed", etc.)
Line 35: Line 48:
Update the packages list:
Line 37: Line 49:
{{{aptidue update}}} == Manual use as root ==
Line 39: Line 51:
Upgrade the packages: You can also use aptitude in the same manner as apt-get:
Line 41: Line 53:
{{{aptitude upgrade}}} Update the packages list :
{{{
#
aptitude update
}}}
Line 43: Line 58:
Install foo: Upgrade the packages :
{{{
# aptitude safe-upgrade
}}}
Line 45: Line 63:
{{{aptitude install foo}}} Install foo :
{{{
#
aptitude install foo
}}}
Line 47: Line 68:
Remove bar: Remove bar :
{{{
# aptitude remove bar
}}}
Line 49: Line 73:
{{{aptitude remove bar}}} Purge foo :
{{{
#
aptitude purge foo
}}}
Line 51: Line 78:
''Hey, what's ["foo"] and ["bar"]?''
Line 53: Line 79:
Personally, i still use {{{apt-cache search foo}}} to make an search, the {{{aptitude search foo}}} is slower. But you should try the {{{aptitude search foo}}} way, you should discover that the output is a bit different as of {{{apt-cache}}}, in some case, it may be usefull to search for an package and see at the same time if these is already installed or not. == Functions for every user ==
Line 55: Line 81:
The manual of aptitude is realy an gold mine. We not got to duplicate this useful informations, so please take an look there for futher informations. <<Anchor(search)>>
Search for packaging containing foo :
{{{
$ aptitude search foo
}}}
Line 57: Line 87:
== Package == Personally, I still use {{{apt-cache search foo}}} to perform a search – {{{aptitude search foo}}} is slower. But you should try the {{{aptitude search foo}}} way. You should discover that the output is a bit different from {{{apt-cache}}}, in some cases, it may be useful to search for a package to see if it is already installed.
Line 59: Line 89:
http://packages.debian.org/aptitude <<Anchor(show)>>
showing if a specific package is installed :
{{{
$ aptitude show foo
}}}
Line 61: Line 95:
== Home page == <<Anchor(upgrade)>>
Line 63: Line 97:
 * [http://aptitude.sourceforge.net/screenshots.html Screenshots]. == How to upgrade your distribution ==
Upgrading from one stable release to the next (e.g. Lenny to Squeeze) is done by following the [[http://www.debian.org/releases/stable/releasenotes|release notes]] for your [[http://www.debian.org/ports/|architecture]]. For most people with 32 bit systems that means the [[http://www.debian.org/releases/stable/i386/release-notes/|Release Notes for Intel x86]]. For most with 64 bit systems that means the [[http://www.debian.org/releases/stable/amd64/release-notes/|Release Notes for AMD64]].
Line 65: Line 100:
== Manual ==
/usr/share/doc/aptitude/README
Using {{{full-upgrade}}} in the regular course of events is no longer the recommended practice (unless you are running sid, in which case you should not need to be reading this.)
Line 68: Line 102:
== See also ==
["apt.conf"],
["preferences"],
["sources.list"],
["Aptitude::Parse-Description-Bullets=true"]
Minor release upgrades (e.g. from lenny 5.0.1 to 5.0.2) and security updates are done with {{{safe-upgrade}}}.

 * Find out the current version of Debian that you are running:
{{{
$ cat /etc/debian_version
}}}
Example for upgrading from, e.g., etch 4.0r1 to 4.0r2 ...etc., or applying security upgrades:

{{{
# aptitude update
# aptitude safe-upgrade
}}}
== apt-get to aptitude ==

||'''Action'''||'''apt-get command'''||'''aptitude command'''||
||<style="background-color:#aaccff;">Install foo||apt-get install foo||aptitude install foo||
||<style="background-color:#aaccff;">Search foo||apt-cache search foo||aptitude search foo||
||<style="background-color:#aaccff;">Remove foo||apt-get remove foo||aptitude remove foo||
||<style="background-color:#aaccff;">List reverse dependencies||apt-cache rdepends foo||aptitude search ~Dfoo||
||<style="background-color:#aaccff;">Print information on priorities for foo||apt-cache policy foo||aptitude versions foo ||
||<style="background-color:#aaccff;">Download foo's sources and build a binary .deb package||apt-get source --compile foo||<style="background-color:#FF0000;">?||

== Advanced search patterns ==
Looking for packages installed from anything else than stable:
{{{
aptitude search '?narrow(?installed, !?archive(stable))'
}}}

Looking for packages installed from testing (assuming you have sources lists with stable and testing repositories):
{{{
aptitude search '?narrow(?installed, ?archive(testing) !?archive(stable))'
}}}

== See Also ==

 * `aptitude` manuals
  * if locally installed
   * presuming you also installed [[DebianPkg:aptitude-doc-en]] (other languages are available), an HTML manual for your version should be @ [[file:///usr/share/doc/aptitude/html/en/index.html|/usr/share/doc/aptitude/html/en/index.html]] (change path for your language as appropriate)
   * a text manual for your version should be @ [[file:///usr/share/doc/aptitude/README|/usr/share/doc/aptitude/README]]
  * the most up-to-date HTML manual is usually available [[http://aptitude.alioth.debian.org/doc/en/|online]]
 * [[http://algebraicthunk.net/~dburrows/projects/aptitude/|aptitude screenshots]].
 * [[http://www.debian.org/doc/manuals/reference/ch02.en.html#_basic_package_management_operations | Debian Reference Manual: Package Management]]
 * [[DebianSoftware|Additional Software for Debian Stable]]

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

----
 CategoryQuickPackageManagement

Translation(s): English - Español - Français - Русский - Italiano- 简体中文

(!) ?Discussion


Introduction

Aptitude is an Ncurses based FrontEnd to Apt, the debian package manager. Since it is text based, it is run from a terminal or a CLI (command line interface). Aptitude has a number of useful features, including:

  • a mutt-like syntax for matching packages in a flexible manner
  • mark packages as "automatically installed" or "manually installed" so that packages can be auto-removed when no longer required

  • colorful preview of actions about to be taken
  • dselect-like persistence of user actions
  • the ability to retrieve and display the Debian changelog of most packages
  • AptCLI-like (= apt-get + apt-cache) command line mode ("aptitude install foo")

  • Score-based and (usually) smarter dependency resolver than apt-get

The name of its primary command is aptitude, as is the name of its primary Debian package. The manual for the latest aptitude version is usually available here (in English). If you have package=aptitude-doc-en installed (other languages are available), you can find an HTML manual for your current version here (change path for other languages as appropriate).

Interactive Use

To run interactively, enter the following from a terminal:

aptitude

After running it, use:

  • F10 to access the menu and use aptitude. This is the main key.
  • ? for help
  • The 'up', 'down', 'left', 'right' keys to navigate.
  • The 'Enter' key to select
  • 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)

The common use of aptitude in TUI (text user interface) is; run aptitude; press 'u' (update the lists of available packages); press 'U' (Mark all upgradable packages to be upgraded); (search/select some stuff to install, is optional); press 'g' (to see the pending actions and modify if needed); press 'g' (again, to start the download).

Some time when you need to resolve conflicts, you discover that you made a mistake; you can easily use 'Cancel pending actions' in the 'Actions' menu so that you can re-select.

When reviewing pending actions:

  • 'a' explicitly accepts an action (use again to unaccept)
  • 'r' rejects an action
  • 'g' again goes ahead with pending actions

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

Manual use as root

You can also use aptitude in the same manner as apt-get:

Update the packages list :

# aptitude update

Upgrade the packages :

# aptitude safe-upgrade

Install foo :

# aptitude install foo

Remove bar :

# aptitude remove bar

Purge foo :

# aptitude purge foo

Functions for every user

Search for packaging containing foo :

$ aptitude search foo

Personally, I still use apt-cache search foo to perform a search – aptitude search foo is slower. But you should try the aptitude search foo way. You should discover that the output is a bit different from apt-cache, in some cases, it may be useful to search for a package to see if it is already installed.

showing if a specific package is installed :

$ aptitude show foo

How to upgrade your distribution

Upgrading from one stable release to the next (e.g. Lenny to Squeeze) is done by following the release notes for your architecture. For most people with 32 bit systems that means the Release Notes for Intel x86. For most with 64 bit systems that means the Release Notes for AMD64.

Using full-upgrade in the regular course of events is no longer the recommended practice (unless you are running sid, in which case you should not need to be reading this.)

Minor release upgrades (e.g. from lenny 5.0.1 to 5.0.2) and security updates are done with safe-upgrade.

  • Find out the current version of Debian that you are running:

$ cat /etc/debian_version

Example for upgrading from, e.g., etch 4.0r1 to 4.0r2 ...etc., or applying security upgrades:

# aptitude update
# aptitude safe-upgrade

apt-get to aptitude

Action

apt-get command

aptitude command

Install foo

apt-get install foo

aptitude install foo

Search foo

apt-cache search foo

aptitude search foo

Remove foo

apt-get remove foo

aptitude remove foo

List reverse dependencies

apt-cache rdepends foo

aptitude search ~Dfoo

Print information on priorities for foo

apt-cache policy foo

aptitude versions foo

Download foo's sources and build a binary .deb package

apt-get source --compile foo

?

Advanced search patterns

Looking for packages installed from anything else than stable:

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

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

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

See Also

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


  • ?CategoryQuickPackageManagement