aptitude user's manual Version 0.4.3 Daniel Burrows Copyright © 2004-2006 Daniel Burrows This manual is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This manual is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this manual; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------------- Table of Contents Introduction What is this aptitude thing, anyway? What is a package manager? What is the apt system? How can I get aptitude? Pre-built aptitude packages, or, ``What 99% of Users Should Do'' Building aptitude from source code Getting aptitude from darcs 1. Getting Started Using aptitude aptitude Basics Navigating the aptitude package list Finding packages by name Managing packages Updating the package list and installing packages Using aptitude from the command line 2. aptitude Reference Guide The aptitude UI Using the menus Menu commands Working with multiple views Becoming root Managing packages Managing the package list Accessing package information Modifying package states Solving Dependency Problems Downloading, installing, and removing packages Understanding and managing package trust Managing automatically installed packages Search Patterns Customizing aptitude Customizing the Package List Customizing keybindings Customizing text colors and styles Customizing the display layout Configuration file reference Themes Playing Minesweeper 3. aptitude FAQ 4. Credits I. Command-Line Reference aptitude --; high-level interface to the package manager List of Figures 2.1. Commands available in the Actions menu 2.2. Commands available in the Undo menu 2.3. Commands available in the Package menu 2.4. Commands available in the Resolver menu 2.5. Commands available in the Search menu 2.6. Commands available in the Options menu 2.7. Commands available in the Views menu 2.8. Commands available in the Help menu 2.9. Values of the ``current state'' flag 2.10. Values of the ``action'' flag 2.11. Customizable styles in aptitude Introduction Table of Contents What is this aptitude thing, anyway? What is a package manager? What is the apt system? How can I get aptitude? Pre-built aptitude packages, or, ``What 99% of Users Should Do'' Building aptitude from source code Getting aptitude from darcs ``Master, does Emacs possess the Buddha nature?'' the novice asked. ``I don't see why not,'' replied the master. ``It's got bloody well everything else.'' Several years later, the novice suddenly achieved enlightenment. -- John Fouhy Hello, and welcome to the aptitude user's manual! This introductory section explains what aptitude is and how to get your hands on it; for information on actually using it, please proceed to Chapter 1, Getting_Started. What is this aptitude thing, anyway? aptitude is a featureful package manager for Debian GNU/Linux systems, based on the renowned apt package management infrastructure. aptitude provides the functionality of dselect and apt-get, as well as many additional features not found in either program. What is a package manager? A package manager keeps track of what software is installed on your computer, and allows you to easily install new software, upgrade software to newer versions, or remove software that you previously installed. As the name suggests, package managers deal with packages: collections of files that are bundled together and can be installed and removed as a group. Often, a package is just a particular program. For instance, the instant messaging client gaim is contained in the Debian package of the same name. On the other hand, it is common for programs to consist of several interrelated packages. For instance, the gimp image editor consists not only of the gimp package, but also of the gimp-data package; in addition, several optional add-on packages (containing esoteric data, documentation, and so on) are also available. It is also possible for several small, related programs to be contained in a single package: for instance, the fileutils package contains several common Unix commands, such as ls, cp, etc. Some packages require other packages in order to function. In Debian, packages can depend upon, recommend, suggest, or conflict with other packages. * If a package A depends upon another package B, then B is required for A to operate properly. For instance, the gimp package depends upon the gimp-data package in order to ensure that the GIMP graphics editor can access its critical data files. * If a package A recommends another package B, then B provides important additional functionality to A that will be desired in most circumstances. For instance, the mozilla-browser package recommends the mozilla-psm package, which adds support for secure data transfers to the Mozilla Web browser. While mozilla-psm is not strictly required for Mozilla to function, most users will want Mozilla to support the secure transmission of confidential data (such as credit card numbers). * If a package A suggests another package B, then package B provides functionality that may enhance A, but is not needed in most cases. For instance, the kmail package suggests the gnupg package, which contains encryption software that can be used by KMail. * If a package A conflicts with another package B, then the two packages cannot be installed at the same time. For instance, fb-music-hi conflicts with fb- music-low because they provide alternate sets of music for the game Frozen Bubble. The job of a package manager is to present an interface which assists the user in managing the collection of packages installed on his or her system. aptitude provides such an interface by building on the apt package management system. What is the apt system? Being able to install and remove packages is great, but the basic software for doing this (known as dpkg) does exactly that and nothing more. This is fine if you download one or two packages by hand, but quickly becomes cumbersome when you are trying to manage a large number of packages. Furthermore, if your shiny new package requires software you haven't yet installed, you have to download the newly required software by hand. And if you later decide to remove the no- longer-shiny package, these extra packages will linger on your system, consuming hard drive space, unless you manually remove them. Obviously, all of this manual labor is a tedious chore, and so most package management systems come with software which takes care of some or all of it for you. apt is a common base on which to build these programs: in addition to aptitude, programs such as synaptic and apt-watch make use of apt. apt works by keeping a list of the packages that can be downloaded from Debian on your computer. This list is used to find packages that need to be upgraded and to install new packages. apt can also solve many dependency problems automatically: for instance, when you choose to install a package, it will find any additional required packages and install those as well. When working with a package manager based on apt, such as aptitude, you will typically perform three basic tasks: you will update the list of packages that are available by downloading new lists from the Debian servers, you will select which packages should be installed, upgraded, or removed, and finally, you will commit your selections by actually performing the installations, removals, etc. apt-based package managers read the list of ``sources'' -- repositories of Debian packages -- from the file /etc/apt/sources.list. The format and contents of this file are beyond the scope of this document, but are described in the manual page sources.list(5). How can I get aptitude? In case you are reading this manual but aptitude is not yet installed on your system, this section explains how to correct this unfortunate situation. Most people should head straight for the section on binary packages. Pre-built aptitude packages, or, ``What 99% of Users Should Do'' Pre-built, or ``binary'' packages are the easiest and most common way to install aptitude. You should only attempt a source install if binary packages are not available for some reason, or if you have unusual needs that are not met by binary packages. If you are using a Debian system, execute the following command as root: apt-get install aptitude. If you are not using a Debian system, your system provider might have created a pre-built package of aptitude; if you are not sure, you can contact them for further suggestions. Building aptitude from source code You also can build aptitude from source; however, this is probably not a useful exercise unless apt is already available on your system. If it is, you can install aptitude from source with the following steps: 1. Install the following pieces of software: * A C++ compiler, such as g++. * The development files for apt, typically available in a package with a name like libapt-pkg-dev. * The libsigc++-2.0 library, available from http://libsigc.sourceforge.net. * Last but not least, download the most recent aptitude source code, available from http://packages.debian.org/unstable/admin/aptitude. (scroll to the bottom of the page and download the ``.orig.tar.gz'' file) Once all the required components are available, open a terminal and execute the command tar zxf aptitude-0.4.3.tar.gz to unpack the source code. Once the source code is unpacked, type cd aptitude-0.4.3 && ./configure && make to compile aptitude. If this succeeds, make sure you are the root user (by using su, for instance), then type make install to install aptitude on your computer. Once aptitude is successfully installed, typing aptitude at a command prompt should start the program. Getting aptitude from darcs If you want to test the latest bleeding-edge source code or to otherwise help aptitude development, you can download unreleased aptitude source code using darcs. Install darcs (available from http://www.darcs.net) and execute the command darcs get http://people.debian.org/~dburrows/darcs/aptitude to retrieve the most recent source code. Once the source code is available on your computer, you can cd into it and type darcs pull to update it with any changes made to the main repository. To build aptitude from the darcs repository, you must have the programs autoconf and automake installed. Type sh ./autogen.sh to generate the files needed to compile aptitude, then execute make and make install. [Warning] Warning The aptitude darcs repository is an active development tree; it will change as bugs are fixed and features are added, and there is absolutely no guarantee that it will even compile, let alone run properly! Bug reports are welcome, but be aware that you use development code entirely at your own risk![1] -------------------------------------------------------------------------------- [1]Of course, all free software is used at your own risk, but the risk involved in using an active development tree is much higher. Chapter 1. Getting Started Table of Contents Using aptitude aptitude Basics Navigating the aptitude package list Finding packages by name Managing packages Updating the package list and installing packages Using aptitude from the command line A journey of a thousand miles must begin with a single step. -- Lao Tsu aptitude is a sizeable program with many features, and it can be a bit overwhelming for new users to get acquainted with it. This chapter does not exhaustively describe the features of aptitude (see Chapter 2, aptitude Reference_Guide for that), but it does provide a walk-through of the basic and most commonly used features of the program. Using aptitude This section describes how to use the visual interface of aptitude. For information on using aptitude's command-line interface, see the section called ``Using aptitude from the command line''. aptitude Basics To run aptitude, open your favorite text terminal, and at the command line, type: foobar$ aptitude Once the cache is loaded (this may take some time on slower machines), the main aptitude screen should appear: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --- Installed Packages --- Not Installed Packages --- Obsolete and Locally Created Packages --- Virtual Packages --- Tasks These packages are currently installed on your computer. As you can see, the main screen of aptitude is divided into several regions. The blue line at the top of the terminal is the menu bar, and the blue lines below it are informational messages describing some important commands. The black space that follows is the list of all available packages, in which some groups of packages are listed. The currently selected group (``Installed Packages'') is highlighted, and its description is shown in the lower black space. As the top line of the screen suggests, you can access aptitude's menus by pressing Control+t; you can also click the mouse on a menu title if your system supports it. Pressing Control+t will open the Actions menu: Actions Undo Package Search Options Views Help +-------------------------+ u: Update g: Download/Install/Remove Pkgs |Install/remove packages g| |Update package list u| |Forget new packages f| |Clean package cache |eated Packages |Clean obsolete files | |Mark Upgradable U| |Play Minesweeper | |Become root | +-------------------------+ |Quit Q| +-------------------------+ These packages are currently installed on your computer. Perform all pending installs and removals Use the arrow keys and Enter to select menu items (or, if your system supports it, click on them with a mouse); to close the menu without selecting anything, press Control-t again. The currently highlighted menu item is explained at the bottom of the screen. If a menu item can be activated using a keyboard shortcut, the shortcut is displayed in the menu: for instance, the command ``Update package list'' can be activated by pressing u. At any time, you can press ? to display an on-line reference to the available keyboard shortcuts. Navigating the aptitude package list The list of packages is the primary interface to aptitude. When aptitude starts, the list is organized into a number of groups, as can be seen in the following screen shot: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --- Installed Packages --- Not Installed Packages --- Obsolete and Locally Created Packages --- Virtual Packages --- Tasks These packages are currently installed on your computer. [Note] Note Empty groups of packages are automatically hidden by aptitude, so you may see more or less groups than appear in this screen shot. In the screen shot above, the first group (``Installed Packages'') is highlighted to indicate that it is currently selected. You can move the selection up and down with the arrow keys; note that the description below the package list changes as you do so. To ``expand'' a group, press Enter while the group is selected: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --\ Installed Packages --- admin - Administrative utilities (install software, manage users, etc) --- base - The Debian base system --- devel - Utilities and programs for software development --- doc - Documentation and specialized programs for viewing documentation --- editors - Text editors and word processors --- electronics - Programs for working with circuits and electronics --- games - Games, toys, and fun programs --- gnome - The GNOME Desktop System --- graphics - Utilities to create, view, and edit graphics files These packages are currently installed on your computer. As you can see, the ``Installed Packages'' group has been expanded to reveal its contents: it contains a number of subgroups, loosely defined by what types of software they contain. Expanding the ``admin'' section by selecting it and pressing Enter, we see: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --\ Installed Packages --\ admin - Administrative utilities (install software, manage users, etc) --- main - The main Debian archive --- base - The Debian base system --- devel - Utilities and programs for software development --- doc - Documentation and specialized programs for viewing documentation --- editors - Text editors and word processors --- electronics - Programs for working with circuits and electronics --- games - Games, toys, and fun programs --- gnome - The GNOME Desktop System Packages in the 'admin' section allow you to perform administrative tasks such as installing software, managing users, configuring and monitoring your system, examining network traffic, and so on. The ``admin'' group contains a single subgroup, the ``main'' Debian archive. Expanding this group reveals some packages! [Tip] Tip To save time, you can use the [ key to expand all the subgroups of a group at once. Selecting ``Installed Packages'' and pressing [ would have immediately revealed the packages in the screenshot below. Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --\ Installed Packages --\ admin - Administrative utilities (install software, manage users, etc) --\ main - The main Debian archive i acpid 1.0.3-19 1.0.3-19 i alien 8.44 8.44 i anacron 2.3-9 2.3-9 i apt-show-versions 0.07 0.07 i A apt-utils 0.5.25 0.5.25 i apt-watch 0.3.2-2 0.3.2-2 i aptitude 0.2.14.1-2 0.2.14.1-2 The Debian distribution consists of packages from the 'main' section. Every package in 'main' is Free Software. For more information about what Debian considers to be Free Software, see http://www.debian.org/social_contract#guidelines In addition to the arrow keys, you can move the selection through the package list a page of information at a time using the Page Up and Page Down keys. [Tip] Tip When there is more information in the lower half of the display than fits into the available space, the a and z keys can be used to scroll through it. Finding packages by name To quickly find a package whose name you know, press / to open a search dialog: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 i frozen-bubble 1.0.0-5 1.0.0-5 i A frozen-bubble-data 1.0.0-5 1.0.0-5 i geekcode 1.7.3-1 1.7.3-1 i gfpoken 0.25-3 0.25-3 i ggz-gnome-client 0.0.7-2 0.0.7-2 i ggz-gtk-client 0.0.7-1 0.0.7-1 i ggz-gtk-game-data 0.0.7-2 0.0.7-2 i +--------------------------------------------------------------------------+ i |Search for: | i |froz | Po| [ Ok ] [ Cancel ]| Fr+--------------------------------------------------------------------------+ attempt to shoot bubbles into groups of the same color to cause them to pop. It features 100 single-player levels, a two-player mode, music and striking graphics. This game is widely rumored to be responsible for delaying the Woody release. URL: http://www.frozen-bubble.org/ As you can see in the above screen shot, a search for froz finds the frozen- bubble package. Using aptitude's powerful search language, described in the section called ``Search Patterns'', it is possible to find packages based on many complex criteria. [Tip] Tip You can search backwards in the package list by pressing \, and you can repeat the last search by pressing n after closing the search window. Sometimes it is useful to hide all packages except those which meet some particular criterion. To do this, press l: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --- Installed Packages --- Not Installed Packages --- Obsolete and Locally Created Packages --- Virtual Packages --- Tasks +--------------------------------------------------------------------------+ |Enter the new package tree limit: | |apti | | [ Ok ] [ Cancel ]| Th+--------------------------------------------------------------------------+ a This dialog works exactly like the search dialog, except that instead of highlighting the next package that matches what you typed into the dialog box, it hides all packages which don't match. For instance, typing apti into this dialog box and pressing Enter will hide all packages except those whose names contain ``apti'': Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --\ Installed Packages --\ admin - Administrative utilities (install software, manage users, etc) --\ main - The main Debian archive i aptitude 0.2.14.1-2 0.2.14.1-2 i A synaptic 0.51-1 0.51-1 --\ x11 - The X window system and related software --\ main - The main Debian archive i xfree86-driver-synaptics 0.13.3-1 0.13.3-1 --- Not Installed Packages --- Virtual Packages These packages are currently installed on your computer. Managing packages Now that you can move about the list of packages, it's time to start using aptitude to install and remove packages. In this section you will learn how to flag packages for installation, deletion, and upgrade. [Tip] Tip You can only change your system's setup as the root user. If you want to experiment with aptitude, you can safely run it as any user other than root without damaging your system in any way. aptitude will tell you when you try to do something that only root can do, and if you want to continue, you must type root's password. All changes to a package are performed by first highlighting it in the package list, then pressing a key corresponding to the action which should be performed. The basic action keys [2] are + to install or upgrade a package, - to remove a package, and = to prevent a package from being automatically upgraded (this is known as holding the package). These actions are not performed immediately; aptitude will simply update the package list to show the change that has been requested. For instance, in the screen shot below, the kaffeine package was selected and + was pushed. The package is now highlighted in green and the letter ``i'' has appeared to the left of its name, to indicate that it will be installed; in addition, an estimate of the amount of space that the package will use is displayed. Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 Will use 2925kB of disk space DL Size: 1375kB --\ kde - The KDE Desktop System --\ main - The main Debian archive p bibletime-i18n 1.4.1-1 p education-desktop-kde 0.771 p junior-kde 1.4 piA kaffeine +2843kB 0.4.3-1 pi kaffeine-mozilla +81.9kB 0.4.3-1 p karamba 0.17-5 p kde-devel 4:3.1.2 p kde-devel-extras 4:3.1.2 The K Desktop Environment (development files) A metapackage containing dependencies for the core development suite of KDE including kdesdk, qt3-designer, and all core KDE -dev packages. [Tip] Tip At any time, you can use Undo → Undo (Control+u) to ``undo'' any change to one or more packages. This is very useful if an action has unforeseen consequences and you want to ``take it back''. In addition to actions that affect individual packages, another important action is available: typing U will attempt to upgrade any packages that can be upgraded. You should use this command on a regular basis to keep your system up- to-date. Managing Broken Packages Sometimes, changing a package's state will cause dependency relationships to become unfulfilled; packages with unfulfilled dependencies are said to be broken. aptitude will warn you when this happens, and explain why it occured. For instance, here is what happens if I attempt to remove sound-juicer: Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.3.3 #Broken: 1 Will free 48.6MB of disk space i A nautilus 2.10.1-4 2.10.1-4 i nautilus-cd-burner 2.10.2-1.1 2.10.2-1.1 i A nautilus-data 2.10.1-4 2.10.1-4 i netspeed 0.12.1-1 0.12.1-1 i A oaf 0.6.10-3 0.6.10-3 i pybliographer 1.2.6.2-1 1.2.6.2-1 i rhythmbox 0.8.8-13 0.8.8-13 i shermans-aquarium 3.0.1-1 3.0.1-1 idA sound-juicer -1733kB 2.10.1-3 2.10.1-3 GNOME 2 CD Ripper sound-juicer will be removed. The following packages depend on sound-juicer and will be broken by its removal: * gnome-desktop-environment depends on sound-juicer [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous As you can see, aptitude displays three indicators that something has gone wrong: first, the number of broken packages is displayed in the upper blue area; second, the lower half of the display changes to describe broken packages that are related to the currently highlighted package; third, a bar appears at the bottom of the screen with a suggestion on how to solve the problem. To quickly find broken packages in the package list, you can press b or search for ~b. [Note] Note The text [1(1)/...] indicates the progress of aptitude's dependency resolver. The first number is the solution that you have currently selected, and the second one is the number of solutions that aptitude has already generated. The presence of the text ``...'' indicates that there may be additional solutions beyond the ones generated; if aptitude knew for certain that it had generated the only possible solution, this indicator would read [1/1]. To see more information about how aptitude thinks you can solve this problem, press e. A screen similar to the following will appear: Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: gstreamer0.8-cdparanoia [0.8.10-1 (unstable, now)] sound-juicer [2.10.1-2 (now)] [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous From here, you can see more solutions by pressing . or return to solutions that you previously examined by pressing ,. To apply the current solution and return to the package list, press !. For instance, pressing . while the above screen is displayed results in the following solution being presented: Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: sound-juicer [2.10.1-3 (unstable, now)] --\ Downgrade the following packages: gstreamer0.8-cdparanoia [0.8.11-1 unstable, now -> 0.8.8-3 testing] [2(2)/...] Suggest 1 keep,1 downgrade e: Examine !: Apply .: Next ,: Previous In addition to the basic solution navigation commands, you can press r to ``reject'' actions of which you disapprove. For instance, the first solution will cancel the removal of sound-juicer -- the very action we were trying to perform! By pressing r on the item corresponding to this action, we can tell aptitude that it should not cancel the removal of sound-juicer in this way. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: gstreamer0.8-cdparanoia [0.8.11-1 (unstable, now)] R sound-juicer [2.10.1-3 (unstable, now)] GNOME 2 CD Ripper gnome-desktop-environment depends upon sound-juicer --\ The following actions will resolve this dependency: -> Remove gnome-desktop-environment [1:2.10.2.3 (unstable, testing, now)] R -> Cancel the removal of sound-juicer -> Downgrade sound-juicer [2.10.1-3 (unstable, now) -> 0.6.1-2 (testing)] [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous As you can see, the list item corresponding to keeping sound-juicer at its current version has turned red and been marked with an ``R'', indicating that it has been rejected. Solutions that you generate in the future (that is, any solution that you have not yet viewed) will not include this action, although solutions that were already generated and contain this action will be available. [Note] Note In the above screen image, a description of sound-juicer is displayed in the middle of the screen; below it, you can see the dependency that caused sound-juicer to be kept at its current version, along with all the ways to resolve this dependency that aptitude knows about. For instance, if this rejection is imposed immediately after attempting to remove sound-juicer, pressing . retrieves the following solution, skipping the solution that cancels the installation of sound-juicer and downgrades gstreamer0.8-cdparanoia. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Remove the following packages: gnome-desktop-environment [1:2.10.2.3 (unstable, testing, now)] [2(2)/...] Suggest 1 removal e: Examine !: Apply .: Next ,: Previous Rejections are only applied to newly generated solutions: that is, solutions that are generated when you press . while viewing the last generated solution. Previously generated solutions can still contain rejections. You can cancel a rejection at any time by once again selecting the rejected action and pressing r; this will permit solutions containing the action to be generated again, including any solutions that were previously ``skipped''. The opposite of rejecting an action is approving it. To approve an action, just select it and press a; this forces the problem resolver to choose the action whenever possible[3]. Approved actions will turn green and will be marked with ``A'', as in the following screenshot: Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Remove the following packages: A gnome-desktop-environment [1:2.10.2.3 (unstable, testing, now)] [2(2)/...] Suggest 1 removal e: Examine !: Apply .: Next ,: Previous [Important] Important If you do not resolve any broken dependencies, aptitude will automatically implement its current suggestion when you commit your selections by pressing g. However, it is hard to automatically solve dependency problems, and you may not be happy with the results, so it is generally better to look at what aptitude plans to do before committing your selections. Updating the package list and installing packages At this point, you know enough about aptitude to actually make modifications to your system. You should periodically update your list of available packages from the Debian servers, to keep track of new packages and new versions of packages. To do this, press u. At any time during the download, you can press q to abort it. Once you have fresh lists of packages, you can choose the packages to upgrade, install, or remove as described in the previous section. To review the actions you have requested, press g once. When installing the kaffeine-mozilla package (from the previous example), the following screen appears: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 Will use 2925kB of disk space DL Size: 1375kB --\ Packages being automatically installed to satisfy dependencies piA kaffeine +2843kB 0.4.3-1 --\ Packages to be installed pi kaffeine-mozilla +81.9kB 0.4.3-1 These packages are being installed because they are required by another package you have chosen for installation. If you select a package, an explanation of its current state will appear in this space. As you can see, aptitude automatically decided to install kaffeine for me because kaffeine-mozilla requires it. At this point, I have the choice of either continuing with the installation by pressing g, or aborting it by pressing q. Using aptitude from the command line In addition to its ``visual'' interface described in the previous section, aptitude can be used to manage packages directly from the command-line in the same way that you would use apt-get. This section covers the most common aptitude command-line actions; for more information, see the aptitude command- line reference. In general, a command-line invocation of aptitude will look like this: aptitude action [arguments...] action tells aptitude what action it is to take; the remaining arguments are used in an option-specific fashion. Typically they will consist of package names and command-line switches[4]. The most important actions are: aptitude update This command updates the package lists, as if you had entered the visual interface and pressed u. aptitude upgrade This command will upgrade as many packages as possible. If there are dependency problems, it will avoid upgrading packages (rather than, for instance, removing them). aptitude dist-upgrade This command will also attempt to upgrade packages, but it is more aggressive about solving dependency problems: it will install and remove packages until all dependencies are satisfied. Because of the nature of this command, it is possible that it will do undesirable things, and so you should be careful when using it. aptitude [ install | remove | purge ] pkg1 [pkg2...] These commands install, remove, or purge[5] the specified packages. ``Installing'' a package which is already installed but can be upgraded will cause it to be upgraded. aptitude search pattern1 [pattern2...] This command searches for packages whose name contains any of the given patterns, printing the result to the terminal. In addition to just being a string of text, each pattern can be a search pattern as described in the section called ``Search Patterns''. [6] aptitude show pkg1 [pkg2...] Prints information about each pkg to the terminal. The commands that install, upgrade, and remove packages all accept the parameter -s, which stands for ``simulate''. When -s is passed on the command line, the program performs all the actions it would normally perform, but does not actually download or install/remove any files. aptitude will sometimes present a prompt like this: The following NEW packages will be automatically installed: space-orbit-common The following NEW packages will be installed: space-orbit space-orbit-common 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 3200kB of archives. After unpacking 8413kB will be used. Do you want to continue? [Y/n/?] In addition to the obvious options of ``Yes'' and ``No'', a number of commands are available which can be used to change the information displayed at the prompt, or to specify further actions. For instance, typing s will display or hide information about how much space each package will use: Do you want to continue? [Y/n/?] s Size changes will be shown. The following NEW packages will be automatically installed: space-orbit-common <+8020kB> The following NEW packages will be installed: space-orbit <+393kB> space-orbit-common <+8020kB> 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 3200kB of archives. After unpacking 8413kB will be used. Do you want to continue? [Y/n/?] Similarly, typing d will display information about automatically installed or removed packages: The following NEW packages will be automatically installed: space-orbit-common (D: space-orbit) The following NEW packages will be installed: space-orbit space-orbit-common 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 3200kB of archives. After unpacking 8413kB will be used. This shows that space-orbit-common is being installed because space-orbit depends on it. You can see the entire list of possible entries by entering ? at the prompt. If your request violates dependencies in a way that cannot be trivially resolved, aptitude will ask you what to do: The following packages are BROKEN: libsdl1.2debian The following packages will be REMOVED: libsdl1.2debian-all . . . The following actions will resolve these dependencies: Install the following packages: libsdl1.2debian-oss [1.2.7+1.2.8cvs20041007-4.1 (unstable)] Score is 19 Accept this solution? [Y/n/q/?] Typing y (or simply pressing enter) will accept the proposed solution. Typing n will display the ``next best'' solution: Accept this solution? [Y/n/q/?] n The following actions will resolve these dependencies: Install the following packages: libsdl1.2debian-alsa [1.2.7+1.2.8cvs20041007-4.1 (unstable,now)] Score is 19 Accept this solution? [Y/n/q/?] Typing q will ``give up'' and quit the program immediately: Accept this solution? [Y/n/q/?] q Abandoning all efforts to resolve these dependencies. Abort. As with the main command-line prompt, you can perform a number of additional actions, including manually altering the states of packages, from the dependency resolution prompt. Type ? to see a complete list. For complete documentation of the command-line features of aptitude, see Command-Line Reference. -------------------------------------------------------------------------------- [2] You can also change packages using the Package menu; see the section called ``The Package Menu'' for details. [3] Approving an action is slightly different from requiring all solutions to contain the action; what it means is that given a choice between an approved action and a non-approved action, the resolver will always pick the approved action. If there are several possible approved actions, all of them will be candidates to be placed into the solution. [4]A ``switch'' is a letter preceded by a hyphen: for instance, ``-a'', ``-v'', etc. [5]Purging a package removes the package, as well as all its configuration files. [6] In fact, the same is true of the commands that take packages as arguments, such as install or show. Chapter 2. aptitude Reference Guide Table of Contents The aptitude UI Using the menus Menu commands Working with multiple views Becoming root Managing packages Managing the package list Accessing package information Modifying package states Solving Dependency Problems Downloading, installing, and removing packages Understanding and managing package trust Managing automatically installed packages Search Patterns Customizing aptitude Customizing the Package List Customizing keybindings Customizing text colors and styles Customizing the display layout Configuration file reference Themes Playing Minesweeper The White Rabbit put on his spectacles. 'Where shall I begin, please your Majesty?' he asked. 'Begin at the beginning,' the King said gravely, 'and go on till you come to the end: then stop.' -- Lewis Carrol, Alice in Wonderland aptitude is a large program with many features, and it is sometimes difficult to remember how to do something, or even to remember whether that something is even possible. Indeed, many feature requests received by the author describe features which are already present but are difficult to find.[7] In an attempt to combat this obscurity, this reference guide describes every feature and configuration parameter of aptitude. For a more gentle guide to the important features of aptitude, see Chapter 1, Getting_Started. [Note] Note aptitude's behavior and appearance can be configured in a number of ways. This manual describes how the program works with the default settings; descriptions of how various settings affect behavior are given in the section called ``Customizing aptitude''. The aptitude UI This section describes the parts of the user interface of aptitude that do not deal with managing packages. Using the menus The menu bar at the top of the screen lists the most important commands in aptitude. To activate the menu bar, press Control-t; you can then navigate it using the arrow keys and select a menu item using Enter. Some menu items also have ``hotkeys'': letters or numbers that can be used to select the item while the menu is active. These hotkeys are displayed in a brighter shade of white than the rest of the menu. In addition, some menu items have ``shortcuts'': keystrokes that perform the same action as the menu item while the menu is not active. These keystrokes are listed on the right-hand side of the menu. In the remainder of the manual, menu commands will be written like this: Menu → Item (key). This indicates that you should choose Item from the Menu menu, and that key is the shortcut for this command. Menu commands The Actions Menu Figure 2.1. Commands available in the Actions menu ______________________________________________________________________________ |Command |Description | |______________________________________|_______________________________________| | |If an installation preview is not | |Actions → Install/remove |visible, display one; otherwise, | |packages (g) |perform an install run as described in | | |the section called ``Downloading, | | |installing, and removing packages''. | |______________________________________|_______________________________________| |Actions → Update package list |Bring the package list up-to-date. | |(u) | | |______________________________________|_______________________________________| | |Flag all upgradable packages, except | |Actions → Mark Upgradable (U) |those which are held or forbidden from | | |upgrading, for upgrade. | |______________________________________|_______________________________________| |Actions → Forget new packages |Discard all information about what | |(f) |packages are ``new'' (empty the ``New | | |Packages'' tree). | |______________________________________|_______________________________________| | |Cancel all pending installations, | | |removals, upgrades, and holds. This is | |Actions → Cancel pending actions|equivalent to executing the Keep | | |command on every package in the package| | |database. | |______________________________________|_______________________________________| |Actions → Clean package cache |Delete all the compressed packages that| | |were downloaded by aptitude [a]. | |______________________________________|_______________________________________| | |Delete any compressed packages that | | |were downloaded by aptitude [a] and are| | |no longer available. These are presumed| |Actions → Clean obsolete files |to be packages which are obsolete, and | | |can be deleted to save disk space | | |without requiring an otherwise | | |unnecessary download. | |______________________________________|_______________________________________| | |Play a game of Minesweeper, as | |Actions → Play Minesweeper |described in the section called | | |``Playing Minesweeper''. | |______________________________________|_______________________________________| |Actions → Become root |Continue working as the root user; see | | |the section called ``Becoming root''. | |______________________________________|_______________________________________| |Actions → Quit (Q) |Quit the program, saving any changes to| | |package states. | |______________________________________|_______________________________________| |[a] Or any other apt utility. | |______________________________________________________________________________| The Undo Menu Figure 2.2. Commands available in the Undo menu ______________________________________________________________________________ |Command |Description | |_____________________________|________________________________________________| | |Cancel the effect of the last change to a | |Undo → Undo (Control+u)|package's state, up to the last time the program| | |was started, the package list was updated, or an| | |install run was performed. | |_____________________________|________________________________________________| The Package Menu Figure 2.3. Commands available in the Package menu ______________________________________________________________________________ |Command |Description | |___________________________________|__________________________________________| |Package → Install (+) |Flag the currently selected package for | | |installation. | |___________________________________|__________________________________________| |Package → Remove (-) |Flag the currently selected package for | | |removal. | |___________________________________|__________________________________________| |Package → Purge (_) |Flag the currently selected package to be | | |purged. | |___________________________________|__________________________________________| | |Cancel any pending installation, upgrade, | |Package → Keep (:) |or removal of the currently selected | | |package, and remove any hold that was set | | |on the package. | |___________________________________|__________________________________________| |Package → Hold (=) |Hold the currently selected package back. | |___________________________________|__________________________________________| | |Mark the currently selected package as an | | |``automatically installed'' package. For | |Package → Mark Auto (M) |more information on manually and | | |automatically installed packages, see the | | |section called ``Managing automatically | | |installed packages''. | |___________________________________|__________________________________________| | |Mark the currently selected package as a | | |``manually installed'' package. For more | |Package → Mark Manual (m) |information on manually and automatically | | |installed packages, see the section called| | |``Managing automatically installed | | |packages''. | |___________________________________|__________________________________________| | |If a package that can be upgraded is | | |selected, forbid it from being upgraded to| |Package → Forbid Version (F) |the currently available version. If a | | |version of a package is selected, forbid | | |the package from being upgraded to that | | |version. | |___________________________________|__________________________________________| | |Display a screen containing information | | |about the currently selected package, such| |Package → Information (enter)|as the packages it depends upon, the | | |packages which depend upon it, and its | | |available versions. | |___________________________________|__________________________________________| | |Display the currently selected package's | |package → Changelog (C) |Debian changelog. To see the changelog of | | |a particular version, select that version | | |and execute this command. | |___________________________________|__________________________________________| The Resolver Menu Figure 2.4. Commands available in the Resolver menu ______________________________________________________________________________ |Command |Description | |______________________________________|_______________________________________| | |Display a detailed description of the | |Resolver → Examine Solution (e) |problem resolver's current suggestion | | |(see the section called ``Solving | | |Dependency Problems''). | |______________________________________|_______________________________________| |Resolver → Apply Solution (!) |Carry out the actions that the problem | | |resolver is currently suggesting. | |______________________________________|_______________________________________| |Resolver → Next Solution (.) |Select the problem resolver's next | | |suggestion. | |______________________________________|_______________________________________| |Resolver → Previous Solution (,)|Select the problem resolver's previous | | |suggestion. | |______________________________________|_______________________________________| |Resolver → First Solution (<) |Select the problem resolver's first | | |suggestion. | |______________________________________|_______________________________________| | |Select the problem resolver's most | |Resolver → Last Solution (>) |recently generated solution (see the | | |section called ``Solving Dependency | | |Problems''). | |______________________________________|_______________________________________| | |When examining a solution, toggle | | |whether the currently selected action | | |is rejected and move to the next action| |Resolver → Toggle Rejected (r) |(see the section called ``Solving | | |Dependency Problems''). If the action | | |is currently approved, its approval | | |will be cancelled. | |______________________________________|_______________________________________| | |When examining a solution, toggle | | |whether the currently selected action | | |is approved and move to the next action| |Resolver → Toggle Approved (a) |(see the section called ``Solving | | |Dependency Problems''). If the action | | |is currently rejected, its rejection | | |will be cancelled. | |______________________________________|_______________________________________| | |When examining a solution, view | | |detailed information about the package | |Resolver → View Target (Enter) |which is affected by the currently | | |selected action (see the section called| | |``Solving Dependency Problems''). | |______________________________________|_______________________________________| The Search Menu Figure 2.5. Commands available in the Search menu _____________________________________________________________________________ |Command |Description | |_________________________________|___________________________________________| | |Find the next package in the package list | |Search → Find (/) |that matches a search pattern (see the | | |section called ``Search Patterns''). | |_________________________________|___________________________________________| | |Find the previous package in the package | |Search → Find Backwards (\)|list that matches a search pattern (see the| | |section called ``Search Patterns''). | |_________________________________|___________________________________________| |Search → Find Again (n) |Repeat the last Find command. | |_________________________________|___________________________________________| | |Filter the current package list by removing| |Search → Limit Display (l) |any packages which do not match a search | | |pattern (see the section called ``Search | | |Patterns''). | |_________________________________|___________________________________________| |Search → Un-Limit Display |Un-filter the current package list (all | | |packages will be shown). | |_________________________________|___________________________________________| |Search → Find Broken (b) |Find the next broken package. This is | | |equivalent to searching for ~b. | |_________________________________|___________________________________________| The Options Menu Figure 2.6. Commands available in the Options menu ______________________________________________________________________________ |Command |Description | |___________________________________|__________________________________________| | |Display a dialog box in which you can set | |Options → UI options |options pertaining to the interface (how | | |messages are displayed, how packages are | | |organized, etc). | |___________________________________|__________________________________________| | |Display a dialog box in which you can set | | |options pertaining to how dependencies are| |Options → Dependency handling|treated: for instance, whether to | | |automatically install packages which are | | |recommended by other packages. | |___________________________________|__________________________________________| | |Display a dialog box in which you can set | | |options that don't fit into the previous | |Options → Miscellaneous |two categories: for instance, whether | | |packages should be automatically flagged | | |for upgrade when aptitude starts. | |___________________________________|__________________________________________| |Options → Revert options |Reset all options to their default values.| |___________________________________|__________________________________________| The Views Menu [Note] Note For an overview of how views work, see the section called ``Working with multiple views''. Figure 2.7. Commands available in the Views menu ______________________________________________________________________________ |Command |Description | |_____________________________________|________________________________________| |Views → Next (F6) |Change to the next active view. | |_____________________________________|________________________________________| |Views → Prev (F7) |Change to the previous active view. | |_____________________________________|________________________________________| |Views → Close (q) |Close the current view. | |_____________________________________|________________________________________| |Views → New Package View |Create a new view of the package list. | |_____________________________________|________________________________________| | |Create a view that displays packages | |Views → Audit Recommendations |which are not installed, and which a | | |package installed on your system | | |Recommends. | |_____________________________________|________________________________________| |Views → New Flat Package List |Create a new view of the package list in| | |which packages are not categorized. | |_____________________________________|________________________________________| | |Create a new view of the package list in| |Views → New Debtags Browser |which packages are categorized according| | |to their debtags entries. | |_____________________________________|________________________________________| |Views → New Categorical Browser|View the package list, arranged by | | |category. | |_____________________________________|________________________________________| | |A number of additional menu items | | |appear; these correspond to the | |Additional items |currently active views. To switch | | |directly to a view, select it from the | | |menu. | |_____________________________________|________________________________________| The Help Menu Figure 2.8. Commands available in the Help menu ______________________________________________________________________________ |Command |Description | |__________________________|___________________________________________________| |Help → About |Display some copyright information. | |__________________________|___________________________________________________| |Help → Help (?) |Display the on-line help page. | |__________________________|___________________________________________________| |Help → User's Manual|Display the User's Manual (this document). | |__________________________|___________________________________________________| |Help → FAQ |Display the aptitude FAQ. | |__________________________|___________________________________________________| |Help → ChangeLog |Display a history of the major changes made to | | |aptitude. | |__________________________|___________________________________________________| |Help → License |Display the terms under which you may copy, modify,| | |and distribute aptitude. | |__________________________|___________________________________________________| Working with multiple views aptitude allows you to work with several ``views'' at once. A ``view'' (sometimes called a ``screen'') is simply something that can appear in the area of the screen below the menu bar. The most common view is the package list, but download views are also common. When several views are open at once, a bar listing all the active views will appear at the top of the screen. For instance, if I examine apt by pressing Enter, then examine libc6, the screen will look something like this: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages apt info libc6 info aptitude 0.3.1 i A --\ libc6 2.3.2.ds1- 2.3.2.ds1- Description: GNU C Library: Shared libraries and Timezone data Contains the standard libraries that are used by nearly all programs on the system. This package includes shared versions of the standard C library and the standard math library, as well as many others. Timezone data is also included. Priority: required Section: base Maintainer: GNU Libc Maintainers Compressed size: 4901k Uncompressed size: 15.9M Source Package: glibc --\ Depends --- libdb1-compat --\ Suggests --- locales --- glibc-doc --\ Conflicts GNU C Library: Shared libraries and Timezone data You can close the current view using Views → Close (q). To switch to the next or previous view, use Views → Next (F6) and Views → Prev (F7), or click on the view's name at the top of the screen; you can also find a list of all active views in the Views menu. As shown above, some commands (for instance, viewing information about a package) will create new views automatically; you can also explicitly create a new view using Views → New Package View or Views → New Categorical Browser. Becoming root Some actions, such as updating the package lists, can only be performed as root. If you are not root and you try to update the package lists, aptitude will ask if you want to become root: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 --- Installed Packages --- Not Installed Packages --- Obsolete and Locally Created Packages --- Virtual Packages --- Tasks +-------------------------------------------------------------------------+ |Updating the package lists requires administrative privileges, which | |you currently do not have. Would you like to change to the root account?| | | | [ Become root ] [ Don't become root ] | Th+-------------------------------------------------------------------------+ If you select ``Become root'', aptitude will prompt you for root's password; when you have correctly entered it, aptitude will perform the action that required root privileges. You will still be root after the action completes. You can switch to the root account at any time using the command Actions → Become root. Any changes you have made to package states will be preserved (but will not be saved until you quit aptitude). Managing packages This section describes how to manipulate the list of packages, how to install new packages on your system, and how to remove old packages. Managing the package list To keep the list of packages up-to-date, it is recommended that you periodically update it. You can do this using the Actions → Update package list (u) command. Accessing package information Information about packages is presented in several locations in aptitude: the package list gives a quick overview of the state of each package, and additional views providing detailed information about a package are also available. The Package List The package list displays an ``at-a-glance'' synopsis of a package's state. For instance, the package webmin might have the following synopsis: piAU webmin +5837kB 1.160-2 The four characters on the left-hand side of the synopsis show that the package is not installed (``p''), that it is going to be installed (``i''), that it was automatically chosen to be installed (``A''), and that it is untrusted (``U''). On the right-hand side of the synopsis, the current version and the most recent available version are displayed, along with an indication of how much space will be used by the upgrade. [Tip] Tip You can customize how package synopses are displayed; see the section called ``Customizing how packages are displayed'' for details. The four status flags on the left-hand side of the screen give the basic information about a package's state. The first character is the package's current state. The second character is the action which will be taken on the package. The third character indicates whether the package was automatically installed (see the section called ``Managing automatically installed packages''), and the fourth character indicates whether the package is trusted (see the section called ``Understanding and managing package trust''). The possible values of the ``current state'' flag are given in Figure 2.9, ``Values of the ``current state'' flag'' and the possible values of the ``action'' flag are given in Figure 2.10, ``Values of the ``action'' flag''. Figure 2.9. Values of the ``current state'' flag i - the package is installed and all its dependencies are satisfied. c - the package was removed, but its configuration files are still present. p - the package and all its configuration files were removed, or the package was never installed. v - the package is virtual. B - the package has broken dependencies. u - the package has been unpacked but not configured. C - half-configured: the package's configuration was interrupted. H - half-installed: the package's installation was interrupted. Figure 2.10. Values of the ``action'' flag i - the package will be installed. u - the package will be upgraded. d - the package will be deleted: it will be removed, but its configuration files will remain on the system. p - the package will be purged: it and its configuration files will be removed. h - the package will be held back: it will be kept at its current version, even if a newer version becomes available, until the hold is cancelled. F - An upgrade of the package has been forbidden. r - the package will be reinstalled. the package is ``broken'': some of its dependencies will not be satisfied. B - aptitude will not allow you to install, remove, or upgrade anything while you have broken packages. In addition, aptitude will use colors to indicate package state if your terminal supports it. State distinctions are mainly displayed using the background color: Black The package cannot be upgraded (or is not going to be installed), and it has no dependency problems. If the package is installed, its name will be highlighted. Green The package is going to be installed. Blue The package is currently installed, and it will be upgraded. Magenta The package is currently installed, but it will be removed. White The package is currently installed, and it is ``held'' at its current version: automatic upgrades will ignore it. Red This package is broken: some of its dependencies will not be satisfied. Finally, the lower half of the screen displays the long description. aptitude will attempt to detect whether the package is involved in a dependency problem; if so, information regarding the dependency problem will be displayed here. To cycle between dependency information and the package description, press i. Detailed package information Pressing Enter while a package is highlighted will display the package information screen: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.2.14.1 i A --\ apt 0.5.25 0.5.25 Description: Advanced front-end for dpkg This is Debian's next generation front-end for the dpkg package manager. It provides the apt-get utility and APT dselect method that provides a simpler, safer way to install and upgrade packages. APT features complete installation ordering, multiple source capability and several other unique features, see the Users Guide in apt-doc. Essential: yes Priority: important Section: base Maintainer: APT Development Team Compressed size: 970k Uncompressed size: 2961k Source Package: apt --\ Depends --- libc6 (>= 2.3.2.ds1-4) --- libgcc1 (>= 1:3.3.3-1) --- libstdc++5 (>= 1:3.3.3-1) --\ Suggests --- aptitude | synaptic | gnome-apt | wajig --- dpkg-dev --\ apt-doc (UNSATISFIED) p 0.6.25 p 0.5.25 --\ Replaces --- libapt-pkg-doc (< 0.3.7) --- libapt-pkg-dev (< 0.3.7) --- Package names provided by apt --- Packages which depend on apt --\ Versions p A 0.6.25 i A 0.5.25 This display can be navigated in a manner similar to the package list: for instance, in the screenshot above, I expanded the dependency on apt-doc, revealing the available versions of apt-doc which will fulfill the dependency. These versions can be manipulated in the same way that packages can: for instance, to install version 0.5.25 of apt-doc, you would highlight it and press +. [Tip] Tip To quickly satisfy a dependency, select the dependency and press +; aptitude will attempt to automatically satisfy it. In addition to the dependencies of a package, you can view the package names that it Provides, the packages which depend upon it, and the available versions of the package (including any other packages that Provide it). As usual, you can dismiss this screen and return to the main view by pressing q. For convenience, a few other information screens (which only display some commonly-used information, hiding the rest) are available: press v to view the versions of a package, d to view the dependencies of a package, and r to view the ``reverse dependencies'' of a package (packages which depend upon it). Modifying package states The following commands are available to modify the states of packages. Commands take effect the next time you perform an install run; until you do, all of these commands can be reversed using Undo → Undo (Control+u). To apply a command to a package, simply select the package in a package list and issue the command. These commands can also be applied to groups of packages by selecting the group header (for instance, ``Upgradable Packages'') and issuing the command. ______________________________________________________________________________ |Command |Description | |______________________________________|_______________________________________| | |Flag the current package for | | |installation. | | | | | |If the package is not installed, it | |Install: Package → Install (+) |will be installed. If it is already | | |installed, it will be upgraded if | | |possible and any sticky upgrade | | |prevention that is in effect (eg, Hold)| | |will be cancelled. | |______________________________________|_______________________________________| | |Flag the currently selected package for| | |removal. | |Remove: Package → Remove (-) | | | |If the package is installed, it will be| | |removed. | |______________________________________|_______________________________________| | |Flag the current package to be purged. | | | | | |If the package is installed, it will be| |Purge: Package → Purge (_) |removed. Futhermore, even if it is | | |removed, any remaining files (such as | | |configuration files) related to the | | |package will be removed from the | | |system. | |______________________________________|_______________________________________| | |Flag the current package to be kept at | | |its current version. | | | | |Keep: Package → Keep (:) |Any action that was to be performed on | | |the package -- installation, removal, | | |or upgrade -- is cancelled, and any | | |persistent hold that was set on the | | |package is removed. | |______________________________________|_______________________________________| | |Set a persistent hold on the package. | | | | | |As with Keep, any action that was to be| |Hold: Package → Hold (=) |performed on the package is cancelled. | | |In addition, the package will not be | | |automatically upgraded [a] until the | | |hold is removed. You may cancel a hold | | |by issuing the Install command. | |______________________________________|_______________________________________| | |The package will not be automatically | | |upgraded[a] to the version it would | | |currently be upgraded to. If it was | | |going to be upgraded, the upgrade will | | |be cancelled. | | | | | |If you issue this command on a | |Package → Forbid Version (F) |particular version of a package, the | | |package will not be upgraded to the | | |selected version. Note that only one | | |version can be forbidden at once. | | | | | |This functionality is largely provided | | |as a convenience for users of the | | |``unstable'' distribution, so they can | | |avoid known-bad versions of packages. | |______________________________________|_______________________________________| | |Reinstalls the package. | | | | | |Note that the reinstallation will not | | |be saved when you quit aptitude or | |Reinstall: press L |perform an install run for technical | | |reasons. (essentially, the underlying | | |software layers (dpkg and apt) do not | | |provide any way to find out whether a | | |reinstallation was successful or not). | |______________________________________|_______________________________________| | |Sets whether the package is treated as | | |having been automatically installed; | |Package → Mark Auto (M), Package|automatically installed packages will | |→ Mark Manual (m) |be removed when no other package | | |requires them. For more information, | | |see the section called ``Managing | | |automatically installed packages''. | |______________________________________|_______________________________________| |[a] That is, it will be unaffected by Actions → Mark Upgradable (U) or | |the dist-upgrade or upgrade command-line actions. | |______________________________________________________________________________| In addition to these commands that affect the selected package, there are two commands that affect large numbers of packages at once regardless of what is selected. Actions → Forget new packages (f) clears the ``new'' status of all packages in the package list, and Actions → Mark Upgradable (U) flags every package which can be upgraded for upgrade, except for packages that are held back or would be upgraded to a forbidden version. [Note] Note All changes to package states are saved when you quit aptitude, update the package list, or perform an install run. If you do not wish to save your changes, you can always abort aptitude by pressing Ctrl-C. Solving Dependency Problems If a dependency problem arises, aptitude can assist you in resolving it. As soon as a problem occurs, a red bar will appear at the bottom of the screen with a summary of aptitude's suggestion about how to fix it. For instance, in the following screenshot, aptitude is indicating that it can resolve the situation by keeping two packages at their current versions. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.3.3 #Broken: 1 Will free 48.6MB of disk space i A nautilus 2.10.1-4 2.10.1-4 i nautilus-cd-burner 2.10.2-1.1 2.10.2-1.1 i A nautilus-data 2.10.1-4 2.10.1-4 i netspeed 0.12.1-1 0.12.1-1 i A oaf 0.6.10-3 0.6.10-3 i pybliographer 1.2.6.2-1 1.2.6.2-1 i rhythmbox 0.8.8-13 0.8.8-13 i shermans-aquarium 3.0.1-1 3.0.1-1 idA sound-juicer -1733kB 2.10.1-3 2.10.1-3 GNOME 2 CD Ripper sound-juicer will be removed. The following packages depend on sound-juicer and will be broken by its removal: * gnome-desktop-environment depends on sound-juicer [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous As indicated at the bottom of the screen, you can view additional solutions by pressing . and ,, apply the current solution by pressing !, and examine the solution in more detail by pressing e. When you examine the current solution, a screen similar to the following will appear: Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: gstreamer0.8-cdparanoia [0.8.10-1 (unstable, now)] sound-juicer [2.10.1-2 (now)] [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous You can access information about the package affected by an action by simply pressing Enter while the package is highlighted. For a more detailed explanation of why aptitude made a particular decision, you can highlight the element in the list. When you do so, the lower half of the screen will display the dependency which was resolved by aptitude's choice, along with every way in which this dependency could have been resolved. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: gstreamer0.8-cdparanoia [0.8.11-1 (unstable, now)] sound-juicer [2.10.1-3 (unstable, now)] cdparanoia plugin for GStreamer sound-juicer depends upon gstreamer0.8-cdparanoia --\ The following actions will resolve this dependency: -> Downgrade sound-juicer [2.10.1-3 (unstable, now) -> 0.6.1-2 (testing)] -> Remove sound-juicer [2.10.1-3 (unstable, now)] -> Cancel the removal of gstreamer0.8-cdparanoia -> Downgrade gstreamer0.8-cdparanoia [0.8.11-1 (unstable, now) -> 0.8.8-3 (tes [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous You can guide the dependency resolver to a solution of which you approve by approving or rejecting the individual actions of a solution. If you approve an action, the resolver will choose it whenever possible, ignoring alternatives (when there are several approved alternatives, all of them will be chosen). On the other hand, if you reject an action, the resolver will never choose that action. To reject a solution, highlight it and press r; the rejection can be cancelled by pressing r again. Similarly, select an action and press a to approve it. You can undo either action by using Undo → Undo (Control+u) while the resolver screen is active. If you cancel a rejection or an approval, any solutions that were ignored will be available the next time that you generate a new solution. Rejected actions are colored red and marked with an ``R'', while approved actions are colored green and marked with an ``A''. You can see this in the following screenshot, where the action ``keep gstreamer0.8-cdparanoia at its current version'' has been rejected, and the action ``keep sound-juicer at its current version'' has been approved. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ Keep the following packages at their current version: R gstreamer0.8-cdparanoia [0.8.11-1 (unstable, now)] A sound-juicer [2.10.1-3 (unstable, now)] [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous Rejections and approvals only affect newly generated solutions. You can tell when a new solution will be generated by examining the indicator in the lower left hand corner of the screen: if there is a number in parentheses, it is the number of solutions that have been generated. Thus, when the number outside the parentheses and the number inside are identical (as above), pressing . will generated a new solution. If there is no number in parentheses (for instance, the indicator reads [1/5]), then there are no more solutions to generated. At any time, you can select the last generated solution by pressing >, and the first generated solution by pressing <. [Important] Important The state of the problem resolver is discarded when you modify the state of any package. If you mark a package for installation, for upgrade, for removal, etc, the resolver will forget all of your rejections and approvals, as well as all the solutions that have been generated so far. In addition to selecting actions in the list at the top of the screen, you can also select them using the list in the bottom half. To access this list, either click in it using the mouse or press Tab. Finally, to see the decisions that the problem resolver took arranged in order, press o. This will give a list of the dependencies that were resolved and the action taken to resolve them, as in the following screenshot. Actions Undo Package Resolver Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs Packages Resolve Dependencies --\ gnome-desktop-environment depends upon sound-juicer -> Cancel the removal of sound-juicer --\ sound-juicer depends upon gstreamer0.8-cdparanoia -> Cancel the removal of gstreamer0.8-cdparanoia GNOME 2 CD Ripper gnome-desktop-environment depends upon sound-juicer --\ The following actions will resolve this dependency: -> Remove gnome-desktop-environment [1:2.10.2.3 (unstable, testing, now)] -> Cancel the removal of sound-juicer -> Downgrade sound-juicer [2.10.1-3 (unstable, now) -> 0.6.1-2 (testing)] [1(1)/...] Suggest 2 keeps e: Examine !: Apply .: Next ,: Previous You can leave this display mode by pressing o again. Downloading, installing, and removing packages Changing package states as described in the previous section does not actually affect what is installed on your system. Thus, you can adjust the state of packages without affecting your system until you are happy with what you see; once you are, you can ``commit'' the changes by actually installing and removing packages.[8] To commit your changes, use the Actions → Install/remove packages (g) command. Selecting this command will display a preview screen describing the changes that will be performed. This screen is just a package list, and you can manipulate the packages (for instance, cancelling unwanted removals) in the same way that you could in the main list. When you are done, use Views → Close (q) to cancel the installation, or use Actions → Install/remove packages (g) to proceed. aptitude will download any files that need to be downloaded, then prompt you to continue with the installation. When you select ``Continue'', the installations and removals will commence. Packages that are downloaded by aptitude are placed in a cache directory (typically /var/cache/apt/archives). Normally, they are just left in this directory ad infinitum. To delete all the files in this directory, use Actions → Clean package cache; to delete only files which cannot be downloaded again (ie, obsolete packages), use Actions → Clean obsolete files. Understanding and managing package trust apt's ability to access multiple package sources leads to a potential security vulnerability. Suppose you add an archive of packages published by Joe Random Hacker to your sources.list file in order to install Joe's gargleblast package. It is possible, however, that -- unbeknownst to you -- Joe's archive also contains his own ``customized'' versions of packages such as libc6 and ssh...versions that steal your private information or open backdoors on your system! If these packages have higher version numbers than the legitimate Debian packages, apt will blithely install them on your system during your next upgrade, allowing Joe to do his dirty work undetected. Joe could also break into your mirror of the Debian archives and replace the legitimate software with his doctored version. Luckily, newer versions of apt and aptitude, such as the version documented in this manual, have built-in safeguards to help defeat this type of attack. apt uses strong security mechanisms based on the popular GPG encryption software to verify that the packages being distributed from the official Debian mirrors are the same packages that were uploaded by the Debian developers. aptitude will then warn you if you attempt to install a package from a non-Debian source, or if you attempt to upgrade a package that was installed from a Debian source to a version that came from a non-Debian source. [Warning] Warning The security mechanisms in apt provide a near-perfect guarantee that the contents of your archive mirror are identical to the contents of the master Debian archive. However, they are not a panacea: for instance, there are many ways that a tampered package could theoretically find its way into the master Debian archive. Ensuring that you only install software from a trusted source will give you an important degree of protection against malicious packages, but it cannot eliminate all the risks inherent in installing software. Understanding trust apt allows the administrator of an archive to provide a signature of the archive's index. This signature, which (for all practical purposes) cannot be forged, indicates that the package files listed in the index are the same files that the administrator intended to place in the archive: ie, that the contents of the archive have not been tampered with since it was created.[9] The signature can be validated by checking that it corresponds to the administrator's public key. The public key of the Debian archive is distributed with apt, typically on your Debian CD. When aptitude downloads an archive index, it will check whether the index is properly signed. If it is unsigned, aptitude will not trust package files from that archive. (see below for information on what this means) If it has a signature but the signature is incorrect or cannot be verified, a warning will be printed and aptitude will refuse to trust packages from that archive. Later, when you perform an install run, aptitude will check whether the packages are from trusted sources. If an untrusted package is being installed, or a package is being upgraded from a trusted to an untrusted version, a warning will be displayed and you will have the opportunity to abort the download: Actions Undo Package Search Options Views Help f10: Menu ?: Help q: Quit u: Update g: Download/Install/Remove Pkgs aptitude 0.3.0 Will use 831kB of disk space DL Size: 30.4MB --\ Packages to be upgraded iu U wesnoth -98.3kB 0.8.7-1 0.8.8-1.0w iuAU wesnoth-data +930kB 0.8.7-1 0.8.8-1.0w +------------------------------------------------------------------------------+ |WARNING: untrusted versions of the following packages will be installed! #| | #| |Untrusted packages could compromise your system's security. You should only #| |proceed with the installation if you are certain that this is what you want #| |to do. #| | #| | * wesnoth [version 0.8.8-1.0wesnoth.org] #| | * wesnoth-data [version 0.8.8-1.0wesnoth.org] #| | * wesnoth-music [version 0.8.8-1.0wesnoth.org] #| | [ Really Continue ] [ Abort Installation ] | +------------------------------------------------------------------------------+ # # # # # # Trusting additional keys You might find it useful to allow apt to trust additional archives, besides the main Debian archive. For each archive that you want to trust, you will have to acquire the public key that is used to sign the archive's package index. This is typically a text file whose name ends in .asc; it might be provided by the site administrator or downloadable from a public keyserver. For more information on what public keys are and how to get them, see the GPG web page. The list of keys that apt will trust is stored in the keyring file /etc/apt/ trusted.gpg. Once you have the GPG key, you can add it to this file by executing the command gpg --no-default-keyring --keyring /etc/apt/trusted.gpg --import newkey.asc. aptitude will then trust any archive that is signed with the key contained in newkey.asc. [Warning] Warning Once an archive's key has been added to the APT keyring, it will be trusted just as much as the main Debian mirrors themselves! You should only do this if you are very confident that the key you are adding is correct and that the person who holds the key is trustworthy and competent. Managing automatically installed packages To install one package, it is often necessary to install several others (to fulfill its dependencies). For instance, if you wish to install the clanbomber package, you must also install the package libclanlib2. If you remove clanbomber again, you probably no longer need the libclanlib2 package; aptitude will attempt to detect this and automatically remove the libclanlib2 package. It works like this: when you install a package, aptitude will automatically install any other packages on which it depends. These packages are marked as having been ``automatically installed''; aptitude will monitor them and remove them when they are no longer depended upon by any manually installed package [10] . They will appear in the preview as ``packages being removed because they are no longer used.'' As with any automatic process, there is a potential for things to go haywire. For instance, even if a package was automatically installed to start with, it might turn out to be useful in its own right. You can cancel the ``automatic'' flag at any time by pressing m; if the package is already being removed, you can use Package → Install (+) to cancel the removal and clear the ``automatic'' flag. Search Patterns When you search for a package or set a display limit in aptitude, the string you enter is known as a ``search pattern''. While the most basic usage of search patterns is to match packages by name, aptitude allows you to create much more complex searches. In addition to the visual interface, some command-line operations can use search terms; see Command-Line Reference for details. A search pattern consists of one or more conditions (sometimes known as ``terms''); packages match the pattern if they match all of its terms. Terms generally start with a tilde character (``~''), followed by a character identifying the type of term, and then any additional text required by the term. By default, patterns are checked against all versions of the package. However, some patterns will restrict which versions are tested. For instance, the ~D pattern takes another pattern as an argument, and matches any package that depends on another package matching that pattern. In this case, only package versions that satisfy the dependency will be tested against. The versions that are used to test for a match will only change in match terms that have a subterm (like ~D). Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [11] in searches (for instance, to find ``g++'', you should use the pattern ``g\+\+''). Normally, ``whitespace'' -- that is, space characters, tabs, and so on - - separates terms but is otherwise ignored by aptitude. To include whitespace (or other special characters) in a term, you can either place a tilde in front of it (as in Debian~ Project) or place quotation marks around it (as in "Debian Project" or even Debian" "Project). Inside a quoted string, the backslash character (``\'') can be used to cancel the special meaning of the quotation mark: for instance, ~d"\"email" will match any package whose description contains a quotation mark followed immediately by email. [12] The following types of terms are available: name Matches packages whose names match the regular expression name. This is the ``default'' search mode and is used for patterns that don't start with ~. [Note] Note To match packages whose names contain several different substrings, use the ~n matcher (described below); for instance, ``~napti~ntude''. !term Matches packages which do not match the term term. For instance, ``!~b'' selects packages that are not ``broken''. [Note] Note To include a ``!'' in a regular expression, it must be ``escaped'' to prevent aptitude from considering it part of a NOT term: ``~!''. term1 | term2 Matches packages that match either term1 or term2. [Note] Note To use the character ``|'' in a regular expression, it must be ``escaped'' to prevent aptitude from creating an OR term from it: ``~|''. (term) Matches term; this is useful to explicitly select the grouping of complex expressions. For instance, ``~D(perl|python)'' matches any package that depends on a package whose name contains either perl or python. ~Aarchive Matches package versions which are available from an archive that matches the regular expression archive. For instance, ``~Atesting'' matches any package available from the testing archive. ~aaction Matches packages upon which the given action is going to be performed. action can be ``install'', ``upgrade'', ``downgrade'', ``remove'', ``purge'', ``hold'' (tests whether a package has been placed on hold), or ``keep'' (tests whether a package will be unchanged). Note that this only tests whether an action is actually queued up to be performed on a package, not whether it could be performed. Thus, for instance, ~aupgrade matches exactly those packages that you have already decided to upgrade, not packages which could be upgraded in the future (for that, use ~U). ~Btype Matches packages which have an unfulfilled (``broken'') dependency of the given type. type can be ``depends'', ``predepends'', ``recommends'', ``suggests'', ``conflicts'', or ``replaces''. ~b Matches packages that are ``broken'': they have an unfulfilled dependency, predependency, or conflict. ~Cterm Matches packages which conflict with a package matching the given term. For instance, ``~C~mdburrows@debian.org'' matches any package which conflicts with a package I maintain. ~c Matches packages which have been removed, but whose configuration files remain on the system (ie, they were removed but not purged). ~D[B][type:]term type may be either ``provides'' or one of the dependency types given in the documentation of ~B. If type is not present, it defaults to depends. If B is present, only broken dependencies will be considered. If type is ``provides'', matches packages that provide a package matching term (the equivalent of ~P). Otherwise, matches packages which declare a dependency of type type upon a package version which matches term. ~ddescription Matches packages whose description matches the regular expression description. ~E Matches Essential packages. ~F This term does not match any package (``F'' stands for ``false''). [13] ~g Matches packages which are not installed, or which were automatically installed and are not depended upon by any installed package. ~Gtag Matches packages whose Tag field matches the regular expression tag. For instance, the pattern ~Ggame::strategy would match strategy games. For more information on tags and debtags, see http:// debtags.alioth.debian.org. ~i Matches package versions which are currently installed. Since all versions are tested by default, this normally matches packages which are currently installed. ~M Matches packages which were automatically installed. ~mmaintainer Matches packages whose Maintainer field matches the regular expression maintainer. For instance, ``~mjoeyh'' will find all packages maintained by Joey Hess. ~N Matches packages which are ``new''. ~nname Matches packages whose name matches the regular expression name. For instance, most of the packages that match ``~n^lib'' are libraries of one sort or another. ~Oorigin Matches package versions whose origin matches the regular expression origin. For instance, ``!~Odebian'' will find any unofficial packages on your system (packages not from the Debian archive). ~Pterm Matches package versions which provide a package that matches the term. For instance, ``~Pmail-transport-agent'' will match all the packages that provide ``mail-transport-agent''. ~ppriority Matches packages whose priority is priority; priority must be extra, important, optional, required, or standard. For instance, ``~prequired'' matches packages whose priority is ``required''. ~R[B][type:]term type may be either ``provides'' or one of the dependency types given in the documentation of ~B. If type is not present, it defaults to depends. If B is present, only broken dependencies will be considered. If type is ``provides'', matches packages whose name is provided by a package version matching term. Otherwise, matches packages which a package version matching term declares a dependency of type type upon. ~S filter term This term ``narrows'' the search to package versions matching filter. In particular, it matches any package version which matches both filter and term. The string value of the match is the string value of term. ~ssection Matches packages whose section matches the regular expression section. ~T This term matches any package. For instance, ``~i~P~T'' matches installed packages which are provided by any package. ~ttask Matches packages that appear in a task whose name matches the regular expression task. ~U This term matches any installed package which can be upgraded. ~Vversion Matches any package version whose version number matches the regular expression version, with the exceptions noted below. For instance, ``~Vdebian'' matches packages whose version contains ``debian''. The following values of version are treated specially. To search for version numbers containing these values, preface the value with a backslash; for instance, to find packages whose version number contains CURRENT, search for \CURRENT. * CURRENT matches the currently installed version of a package, if any. * CANDIDATE matches the version, if any, of the package that will be installed if you press + on the package or run aptitude install on it. * TARGET matches the version of a package that is currently targeted for installation, if any. ~v Matches any package which is purely virtual: that is, its name is provided by a package or mentioned in a dependency, but no package of that name exists. For instance, ``~v!~P~T'' matches packages which are virtual and are not provided by any package: ie, packages which are depended upon but do not exist. ~Wterm ``Widens'' the match: if the versions to match against have been limited by an enclosing matcher (such as ~D), these limits are dropped. Thus, ~Wterm matches a package version if term matches any version of that package. Customizing aptitude Customizing the Package List The package list can be heavily customized: how packages are displayed, how the package hierarchy is formed, how packages are sorted, and even how the display is organized are all open to change. Customizing how packages are displayed This section describes how to configure the contents and format of the package list, status line, and header line. The format of each of these locations is defined by a ``format string''. A format string is a string of text containing %-escapes such as %p, %S, and so on. The resulting output is created by taking the text and replacing the %- escapes according to their meanings (given below). A %-escape can either have a fixed size, in which case it is always replaced by the same amount of text (with extra space characters added to fill it out as necessary), or it can be ``expandable'', meaning that it takes up the space that is not claimed by fixed-size columns. If there are several expandable columns, the extra space is divided evenly between them. All %-escapes come with a default size and/or expandability. The size of a %- escape can be changed by writing it between the % and the character identifying the escape; for instance, %20V generates the candidate version of the package, 20 characters wide. Placing a question mark (?) between the % and the character identifying the escape causes the column's ``basic'' width to vary depending on its content. Note that the resulting columns might not line up vertically! If you want a particular %-escape to be expandable, even though it normally has a fixed width, place a pound sign (ie, ``#'') immediately after it. For instance, to display the candidate version of a package, no matter how long it is, use the format string %V#. You can also place # after something that is not a %-escape; aptitude will ``expand'' the text preceding the # by inserting extra spaces after it. In summary, the syntax of a %-escape is: %[width][?]code[#] The configuration variables Aptitude::UI::Package-Display-Format, Aptitude::UI:: Package-Status-Format, and Aptitude::UI::Package-Header-Format define the default formats the package list, the header at the top of the package list, and the status line below the package list respectively. The following %-escapes are available in format strings: [Note] Note Some of the descriptions below refer to ``the package''. In the GUI, this is either the package being displayed or the currently selected package; in the command-line search, this is the package being displayed. Escape Name Default size Expandable Description This is not really an escape; it simply %% Literal % 1 No inserts a percent sign into the output at the point at which it occurs. In some circumstances, a display format string will have ``parameters'': for instance, in the Parameter command-line search, %#number Replacement Variable No the groups matched by the search are used as parameters when displaying the result. This format code will be replaced by the parameter indicated by number. A single-character flag summarizing any action to be %a Action Flag 1 No performed on the package, as described in Figure 2.10, ``Values of the ``action'' flag''. A somewhat more verbose description %A Action 10 No of the action to be performed on the package. If there are no broken packages, produces nothing. %B Broken Count 12 No Otherwise, produces a string such as ``Broken: 10'' describing the number of broken packages. A single-character flag summarizing the current state of the %c Current State Flag 1 No package, as described in Figure 2.9, ``Values of the ``current state'' flag''. A more verbose %C Current State 11 No description of the current state of the package. %d Description 40 Yes The package's short description. The size of the %D Package Size 6 No package file containing the package. The name of the %H Hostname 15 No computer on which aptitude is running. Displays the highest priority assigned to a package version; %i Pin priority 4 No for packages, displays the priority of the version which will be forced to be installed (if any). The (estimated) %I Installed Size 6 No amount of space the package takes up on disk. %m Maintainer 30 Yes The maintainer of the package. If the package is automatically %M Automatic Flag 1 No installed, outputs ``A''; otherwise, outputs nothing. The length of Outputs the version %n Program Version ``0.4.3''. No of the program, currently ``0.4.3''. The length of the Outputs the program %N Program Name program name. No name; usually ``aptitude''. If no packages are going to be installed, outputs nothing. Otherwise, outputs a string describing the total %o Download Size 15 No size of all the package files which will be installed (an estimate of how much needs to be downloaded); for instance, ``DL size: 1000B''. Outputs the name of the package. When a package is displayed in a tree context, %p Package Name 30 Yes the name of the package will be indented, if possible, according to its depth in the tree. %P Priority 9 No Outputs the priority of the package. Outputs the Reverse Depends approximate number of %r Count 2 No installed packages which depend upon the package. Outputs an abbreviated description of the %R Abbreviated Priority 3 No package's priority: for instance, ``Important'' becomes ``Imp''. %s Section 10 No Outputs the section of the package. If the package is %S Trust Status 1 No untrusted, displays the letter "U". %t Archive 10 Yes The archive in which the package is found. Outputs ``*'' if the %T Tagged 1 No package is tagged, nothing otherwise. [14] If the scheduled actions will alter the amount of space used on the disk, %u Disk Usage Change 30 No outputs a description of the change in disk space; for instance, ``Will use 100MB of disk space.'' Outputs the currently installed version of %v Current Version 10 No the package, or if the package is not currently installed. Outputs the version of the package which would be installed if Package → %V Candidate Version 10 No Install (+) were issued on the package, or if the package is not currently available. Outputs how much additional space will be used or how much %Z Size Change 7 No space will be freed by installing, upgrading, or removing a package. Customizing the package hierarchy The package hierarchy is generated by a grouping policy: rules describing how the hierarchy should be built. The grouping policy describes a ``pipeline'' of rules; each rule can discard packages, create sub-hierarchies in which packages reside, or otherwise manipulate the tree. The configuration items Aptitude::UI:: Default-Grouping and Aptitude::UI::Default-Preview-Grouping set the grouping policies for newly created package lists and preview screens, respectively. You can set the grouping policy for the current package list by pressing G. The grouping policy is described by a comma-separated list of rules: rule1,rule2,.... Each rule consists of the name of the rule, possibly followed by arguments: for instance, versions or section(subdir). Whether arguments are required and how many arguments are required (or allowed) depends on the type of rule. Rules can be non-terminal or terminal. A non-terminal rule will process a package by generating some part of the hierarchy, then passing the package on to a later rule. A terminal rule, on the other hand, will also generate part of the tree (typically items corresponding to the package), but does not pass its package to a later rule. If no terminal rule is specified, aptitude will use the default rule, which is to create the standard ``package items''. action Groups packages according to the action scheduled on them; packages that are not upgradable and will be unchanged are ignored. This is the grouping that is used in preview trees. deps This is a terminal rule. Creates standard package items which can be expanded to reveal the dependencies of the package. filter(pattern) Include only packages for which at least one version matches pattern. If pattern is ``missing'', no packages are discarded. This is a backwards compatibility feature and may be removed in the future. firstchar Groups packages based on the first character of their name. hier Groups packages according to an extra data file describing a ``hierarchy'' of packages. pattern(pattern [=> title][, ...]) A customizable grouping policy. Each version of every package is matched against the given patterns. The first match found is used to assign a title to the package; packages are then grouped by their title. Strings of the form \N that occur in title will be replaced by the Nth result of the match. If title is not present, it is assumed to be \1. For instance, pattern(~m => \1) will group packages according to their Maintainer field. The policy pattern(~m) will do the same thing, as the absent title defaults to \1. See the section called ``Search Patterns'' for more information on the format of pattern. priority Groups packages according to their priority. section[(mode[,passthrough])] Groups packages according to their