816
Comment: aptitude exists,but Aptitude,linked from apt cli page, doesn't. Copied it myself
|
5785
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## copied from http://wiki.debian.org/aptitude aptitude is a ["Ncurses"] terminal-based apt ["frontend"] with a number of useful features, including: |
#language en ||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Aptitude|Français]] - [[it/Aptitude|Italiano]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| ---- ~+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 4: | Line 6: |
* a mutt-like syntax for matching packages in a flexible manner, * dselect-like persistence of user actions, * the ability to retrieve and display the Debian changelog of most packages, and extreme flexibility and customization. |
* 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 aptitude is also non-fattening, naturally cleansing, and housebroken. It does not, however, have Super Cow Powers, meaning that it does not implement the `moo` operation, verbosely or otherwise. |
Line 8: | Line 15: |
aptitude is also Y2K-compliant, non-fattening, naturally cleansing, and housebroken. | The package is [[DebianPkg:aptitude]]. |
Line 10: | Line 17: |
== Run == | ## If your page gets really long, uncomment this Table of Contents <<TableOfContents(2)>> |
Line 12: | Line 20: |
Type | == Interactive Use == To run interactively, enter the following from a [[terminal]]: {{{ aptitude }}} |
Line 14: | Line 26: |
aptitude | After running it, use: |
Line 16: | Line 28: |
in a ["terminal"] | * 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 18: | Line 38: |
== Use == After running it, utilize: |
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 21: | Line 40: |
* F10 to access to the menu and use aptitude. This is the main key. * ? for help == Package == |
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 26: | Line 45: |
http://packages.debian.org/aptitude | 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 28: | Line 47: |
== Home page == | == Manual Use == You can also use aptitude like in the same manner as apt-get: |
Line 30: | Line 50: |
* [http://aptitude.sourceforge.net/screenshots.html Screenshots]. | Update the packages list (as [[Root]]): {{{ # aptitude update }}} Upgrade the packages: {{{ # aptitude safe-upgrade }}} Install foo: {{{ # aptitude install foo }}} Remove bar: {{{ # aptitude remove bar }}} Purge foo: {{{ # aptitude purge 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 case, it may be useful to search for a package to see if it is already installed. The manual of aptitude is really a gold mine. I don't want to duplicate this useful informations so please take a look there for further help. <<Anchor(upgrade)>> == How to upgrade your distribution == Reading and following the instructions found in the [[http://www.debian.org/releases/stable/releasenotes|release notes]] when upgrading to a new major release is '''strongly''' recommended. Once upon a time using 'dist-upgrade' as described below was feasible. It is no longer the recommended practice (unless you are running sid, in which case you should not need to be reading this.) Likewise dist-upgrade is '''not''' necessary for minor release upgrades (e.g. from lenny 5.0.1 to 5.0.2). * Find out current version of Debian that you are running: {{{ $ cat /etc/debian_version }}} Example for upgrading sarge to etch or etch 4.0r1 to 4.0r2 ...etc {{{ # aptitude update # aptitude full-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;">?|| == See Also == * [[http://algebraicthunk.net/~dburrows/projects/aptitude/|Screenshots]]. * Manual : /usr/share/doc/aptitude/README * Online reference manual (html) : http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ * [[http://www.debian.org/doc/manuals/reference/ch02.en.html#_basic_package_management_operations | Debian Reference Manual: Package Management]] and ... [[apt.conf]], [[preferences]], [[sources.list]], [[Aptitude::Parse-Description-Bullets=true]], AptitudeTodo ---- CategoryQuickPackageManagement |
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
aptitude is also non-fattening, naturally cleansing, and housebroken. It does not, however, have Super Cow Powers, meaning that it does not implement the moo operation, verbosely or otherwise.
The package is aptitude.
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
You can also use aptitude like in the same manner as apt-get:
Update the packages list (as Root):
# aptitude update
Upgrade the packages:
# aptitude safe-upgrade
Install foo:
# aptitude install foo
Remove bar:
# aptitude remove bar
Purge foo:
# aptitude purge 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 case, it may be useful to search for a package to see if it is already installed.
The manual of aptitude is really a gold mine. I don't want to duplicate this useful informations so please take a look there for further help.
How to upgrade your distribution
Reading and following the instructions found in the release notes when upgrading to a new major release is strongly recommended. Once upon a time using 'dist-upgrade' as described below was feasible. It is no longer the recommended practice (unless you are running sid, in which case you should not need to be reading this.) Likewise dist-upgrade is not necessary for minor release upgrades (e.g. from lenny 5.0.1 to 5.0.2).
- Find out current version of Debian that you are running:
$ cat /etc/debian_version
Example for upgrading sarge to etch or etch 4.0r1 to 4.0r2 ...etc
# aptitude update # aptitude full-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 |
? |
See Also
- Manual : /usr/share/doc/aptitude/README
Online reference manual (html) : http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/
and ... apt.conf, preferences, sources.list, Aptitude::Parse-Description-Bullets=true, AptitudeTodo
?CategoryQuickPackageManagement