Differences between revisions 54 and 55
Revision 54 as of 2011-01-05 21:47:30
Size: 6313
Editor: ?KarlOPinc
Comment: See also: DebianSoftware
Revision 55 as of 2011-09-03 14:36:01
Size: 6565
Editor: HenriLeFoll
Comment: adding aptitude show
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
## If your page gets really long, uncomment this Table of Contents
<<TableOfContents(2)>>

== Introduction ==
Line 17: Line 21:
## If your page gets really long, uncomment this Table of Contents
<<TableOfContents(2)>>
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.
Line 47: Line 50:
== Manual Use ==
== Manual Use as root ==
Line 50: Line 55:
Update the packages list (as [[Root]]):
Update the packages list :
Line 55: Line 59:
Upgrade the packages:
Line 57: Line 60:
Upgrade the packages :
Line 60: Line 64:
Install foo:
Line 62: Line 65:
Install foo :
Line 65: Line 69:
Remove bar:
Line 67: Line 70:
Remove bar :
Line 70: Line 74:
Purge foo:
Line 72: Line 75:
Purge foo :
Line 75: Line 79:


== functions for every users ==

<<Anchor(search)>>
Search for packaging containing foo :
{{{
$ aptitude search foo
}}}
Line 77: Line 91:
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(show)>>
showing if a specific package is installed :
{{{
$ aptitude show foo
}}}

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

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.

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.

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 like 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 users

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 case, 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 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 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

?

See Also

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