<refentry>
  <refentryinfo>
    <!--
	The <author> element isn't needed here, because docbook-xsl
	automatically generates author information from the main
	document's author element.  Languages that provide only a
	manpage should include this information, though.

    <author>
      <personname>
	<firstname>Daniel</firstname>
	<surname>Burrows</surname>
      </personname>
      <email>dburrows@debian.org</email>
    </author>
    -->
    <title>aptitude</title>

     <!-- NWalsh's docbook scripts use this to generate the footer: -->
    <productname>aptitude</productname>
    <productnumber>&VERSION;</productnumber>

    <legalnotice>
      <para>
	Copyright 2004-2011 Daniel Burrows.
      </para>
      <para>
	Copyright 2014-2016 Manuel A. Fernandez Montecelo
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
	Boston, MA 02110-1301 USA.
      </para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>aptitude</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>aptitude</refname>
    <refpurpose>high-level interface to the package manager</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>autoclean</arg>
	<arg choice='plain'>clean</arg>
	<arg choice='plain'>forget-new</arg>
	<arg choice='plain'>keep-all</arg>
	<arg choice='plain'>update</arg>
      </group>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>full-upgrade</arg>
	<arg choice='plain'>safe-upgrade</arg>
      </group>

      <arg choice='opt' rep='repeat'><replaceable>packages</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>build-dep</arg>
	<arg choice='plain'>build-depends</arg>
	<arg choice='plain'>changelog</arg>
	<arg choice='plain'>download</arg>
	<arg choice='plain'>forbid-version</arg>
	<arg choice='plain'>hold</arg>
	<arg choice='plain'>install</arg>
	<arg choice='plain'>markauto</arg>
	<arg choice='plain'>purge</arg>
	<arg choice='plain'>reinstall</arg>
	<arg choice='plain'>remove</arg>
	<arg choice='plain'>show</arg>
	<arg choice='plain'>showsrc</arg>
	<arg choice='plain'>source</arg>
	<arg choice='plain'>unhold</arg>
	<arg choice='plain'>unmarkauto</arg>
        <arg choice='plain'>versions</arg>
      </group>

      <arg choice='plain' rep='repeat'><replaceable>packages</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='plain'>extract-cache-subset</arg>

      <arg choice='plain'><replaceable>output-directory</replaceable></arg>
      <arg choice='plain' rep='repeat'><replaceable>packages</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <arg choice='plain'>search</arg>

      <arg choice='plain' rep='repeat'><replaceable>patterns</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>add-user-tag</arg>
	<arg choice='plain'>remove-user-tag</arg>
      </group>

      <arg choice='plain'><replaceable>tag</replaceable></arg>

      <arg choice='plain' rep='repeat'><replaceable>packages</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>why</arg>
	<arg choice='plain'>why-not</arg>
      </group>

      <arg choice='opt' rep='repeat'><replaceable>patterns</replaceable></arg>

      <arg choice='plain'><replaceable>package</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>
      <arg choice='opt'>-S <replaceable>fname</replaceable></arg>
      <group choice='opt'>
	<arg choice='plain'>--autoclean-on-startup</arg>
	<arg choice='plain'>--clean-on-startup</arg>
	<arg choice='plain'>-i</arg>
	<arg choice='plain'>-u</arg>
      </group>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>
      <arg choice='plain'>help</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para>
      &aptitude; is a text-based interface to the Debian GNU/Linux
      package system.
    </para>

    <para>
      It allows the user to view the list of packages and to
      perform package management tasks such as installing,
      upgrading, and removing packages.  Actions may be performed
      from a visual interface or from the command-line.
    </para>
  </refsect1>

  <refsect1>
    <title>Command-line actions</title>

    <para>
      The first argument which does not begin with a hyphen (<quote><literal>-</literal></quote>)
      is considered to be an action that the program should
      perform.  If an action is not specified on the command-line,
      &aptitude; will start up in visual mode.
    </para>

    <para>
      The following actions are available:
    </para>

    <variablelist>
      <varlistentry id='cmdlineInstall'>
	<term><literal>install</literal></term>

	<listitem>
	  <para>
	    Install one or more packages.  The packages should be
	    listed after the <quote>install</quote> command; if a
	    package name contains a tilde character
	    (<quote><literal>~</literal></quote>) or a question mark
	    (<quote><literal>?</literal></quote>), it will be treated
	    as a search pattern and every package matching the pattern
	    will be installed (see the section <link
	    linkend='secSearchPatterns'><quote>Search
	    Patterns</quote></link> in the &aptitude; reference
	    manual).
	  </para>

	  <para>
	    To select a particular version of the package, append <quote><literal>=<replaceable>version</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude install
	    apt=0.3.1</literal></quote>.  Similarly, to select a
	    package from a particular archive, append <quote><literal>/<replaceable>archive</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude install
	    apt/experimental</literal></quote>. You cannot specify both an archive and a version for a package.
	  </para>

	  <para id='parOverrideSpecifiers'>
	    Not every package listed on the command line has to be
	    installed; you can tell &aptitude; to do something
	    different with a package by appending an <quote>override
	    specifier</quote> to the name of the package.  For
	    example, <literal>aptitude remove wesnoth+</literal> will
	    install <literal>wesnoth</literal>, not remove it.  The
	    following override specifiers are available:
	  </para>

	  <variablelist>
	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>+</literal></term>
	      <listitem>
		<para>
		  Install <replaceable>package</replaceable>.
		</para>
		<para>
		  If the package was not installed, it is marked as manually
		  installed, and the dependencies newly installed are marked
		  with the automatic flag.  If the package or the dependencies
		  were already installed, the automatic flag is preserved.  See
		  the <link linkend='secAutoInstall'>section about automatic
		  installations</link> in the documentation for more
		  information.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>+M</literal></term>
	      <listitem>
		<para>
		  Install <replaceable>package</replaceable> and
		  immediately mark it as <link
		  linkend='secAutoInstall'>automatically
		  installed</link> (note that if nothing depends on
		  <replaceable>package</replaceable>, this will cause
		  it to be immediately removed).
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>-</literal></term>
	      <listitem>
		<para>
		  Remove <replaceable>package</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>_</literal></term>
	      <listitem>
		<para>
		  Purge <replaceable>package</replaceable>: remove it
		  and all its associated configuration and data files.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>=</literal></term>
	      <listitem>
		<para>
		  Place <replaceable>package</replaceable> on hold:
		  cancel any active installation, upgrade, or removal,
		  and prevent this package from being automatically
		  upgraded in the future.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>:</literal></term>
	      <listitem>
		<para>
		  Keep <replaceable>package</replaceable> at its
		  current version: cancel any installation, removal,
		  or upgrade.  Unlike <quote>hold</quote> (above) this
		  does not prevent automatic upgrades in the future.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>&amp;M</literal></term>
	      <listitem>
		<para>
		  Mark <replaceable>package</replaceable> as having
		  been <link linkend='secAutoInstall'>automatically installed</link>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>&amp;m</literal></term>
	      <listitem>
		<para>
		  Mark <replaceable>package</replaceable> as having
		  been <link linkend='secAutoInstall'>manually installed</link>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>&amp;BD</literal></term>
	      <listitem>
		<para>
		  Install the build-dependencies of a
		  <replaceable>package</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>

	  <para>
	    As a special case, <quote><literal>install</literal></quote> with no
	    arguments will act on any stored/pending actions.
	  </para>

	  <note>
	    <para>
	      Once you enter <userinput>Y</userinput> at the final
	      confirmation prompt, the
	      <quote><literal>install</literal></quote> command will
	      modify &aptitude;'s stored information about what
	      actions to perform.  Therefore, if you issue (e.g.) the
	      command <quote><literal>aptitude install foo
	      bar</literal></quote> on packages previously uninstalled,
	      and then the installation fails once &aptitude; has started
	      downloading and installing packages, you will need to run
	      <quote><literal>aptitude remove foo bar</literal></quote> to go
	      back to the previous state (and possibly undo installations or
	      upgrades to other packages that were affected by the
	      <quote><literal>install</literal></quote> action).
	    </para>
	  </note>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>remove</literal>, <literal>purge</literal>, <literal>reinstall</literal></term>

	<listitem>
	  <para>
	    These commands are the same as
	    <quote><literal>install</literal></quote>, but apply the
	    named action to all packages given on the command line for
	    which it is not <link
	    linkend='parOverrideSpecifiers'>overridden</link>.
	  </para>

	  <para>
	    For instance, <quote><literal>aptitude remove
	    '~ndeity'</literal></quote> will remove all packages
	    whose name contains <quote><literal>deity</literal></quote>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>build-depends</literal>, <literal>build-dep</literal></term>

	<listitem>
	  <para>
	    Satisfy the build-dependencies of a package.  Each package
	    name may be a source package, in which case the build
	    dependencies of that source package are installed;
	    otherwise, binary packages are found in the same way as
	    for the <quote><literal>install</literal></quote> command,
	    and the build-dependencies of the source packages that
	    build those binary packages are satisfied.
	  </para>

	  <para>
	    If the command-line parameter
	    <literal>--arch-only</literal> is present, only
	    architecture-dependent build dependencies (i.e., not
	    <literal>Build-Depends-Indep</literal> or
	    <literal>Build-Conflicts-Indep</literal>) will be
	    obeyed.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>markauto</literal>, <literal>unmarkauto</literal></term>

	<listitem>
	  <para>
	    Mark packages as automatically installed or manually
	    installed, respectively.  Packages are specified in
	    exactly the same way as for the <quote><literal>install</literal></quote> command.
	    For instance, <quote><literal>aptitude markauto
	    '~slibs'</literal></quote> will mark all packages in
	    the <quote><literal>libs</literal></quote> section as
	    having been automatically installed.
	  </para>

	  <para>
	    For more information on automatically installed
	    packages, see the section <quote><link
	    linkend='secAutoInstall'>Managing Automatically
	    Installed Packages</link></quote> in the &aptitude;
	    reference manual.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>hold</literal>, <literal>unhold</literal>, <literal>keep</literal></term>

	<listitem>
	  <para>
	    Mark packages to be on hold, remove this property, or set to keep in
	    the current state.  Packages are specified in exactly the same way
	    as for the <quote><literal>install</literal></quote> command.  For
	    instance, <quote><literal>aptitude hold '~e^dpkg$'</literal></quote>
	    will mark all packages coming from the source package
	    <quote><literal>dpkg</literal></quote> to be on hold.
	  </para>

	  <para>
	    The difference between <literal>hold</literal> and
	    <literal>keep</literal> is that <literal>hold</literal> will cause a
	    package to be ignored by future <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    or <link
	    linkend='manpageFullUpgrade'><literal>full-upgrade</literal></link>
	    commands, while <literal>keep</literal> merely cancels any scheduled
	    actions on the package.  <literal>unhold</literal> will allow a
	    package to be upgraded by future <literal>safe-upgrade</literal> or
	    <link
	    linkend='manpageFullUpgrade'><literal>full-upgrade</literal></link>
	    commands, without otherwise altering its state.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='manpageKeepAll'>
	<term><literal>keep-all</literal></term>

	<listitem>
	  <para>
	    Cancels all scheduled actions on all packages; any
	    packages whose sticky state indicates an installation,
	    removal, or upgrade will have this sticky state cleared.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineForgetNew'>
	<term><literal>forget-new</literal></term>

	<listitem>
	  <para>
	    Forgets all internal information about what packages are
	    <quote>new</quote> (equivalent to pressing
	    <quote><keycap>f</keycap></quote> when in visual mode).
	  </para>

	  <para>
	    This command accepts package names or patterns as arguments.  If the
	    string contains a tilde character
	    (<quote><literal>~</literal></quote>) or a question mark
	    (<quote><literal>?</literal></quote>), it will be treated as a
	    search pattern and every package matching the pattern will be
	    considered (see the section <link
	    linkend='secSearchPatterns'><quote>Search Patterns</quote></link> in
	    the &aptitude; reference manual).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>forbid-version</literal></term>

	<listitem>
	  <para>
	    Forbid a package from being upgraded to a particular version, while
	    allowing automatic upgrades to future versions.  This is useful for
	    example to avoid a known broken version of a package, without having
	    to set and clear manual holds.
	  </para>

	  <para>
	    By default, &aptitude; will select the forbidden version to be the
	    one which the package would normally be upgraded (the candidate
	    version).  This may be overridden by appending
	    <quote><literal>=<replaceable>version</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude
	    forbid-version vim=1.2.3.broken-4</literal></quote>.
	  </para>

	  <para>
	    To revert the action, <quote><literal>aptitude install
	    <replaceable>package</replaceable></literal></quote> will remove the
	    ban.  To remove the forbidden version without installing the
	    candidate version, the current version should be appended:
	    <quote>install
	    <replaceable>package</replaceable><literal>=<replaceable>version</replaceable></literal></quote>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>update</literal></term>

	<listitem>
	  <para>
	    Updates the list of available packages from the &apt;
	    sources (this is equivalent to <quote><literal>apt-get
	    update</literal></quote>)
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='manpageSafeUpgrade'>
	<term><literal>safe-upgrade</literal></term>

	<listitem>
	  <para>
	    Upgrades installed packages to their most recent version.
	    Installed packages will not be removed unless they are
	    unused (see the section <quote><link
	    linkend='secAutoInstall'>Managing Automatically Installed
	    Packages</link></quote> in the &aptitude; reference
	    manual).  Packages which are not currently installed may
	    be installed to resolve dependencies unless the <link
	    linkend='cmdlineOptionNoNewInstalls'><literal>--no-new-installs</literal></link>
	    command-line option is supplied.
	  </para>

	  <para>
	    If no <replaceable>package</replaceable>s are listed on
	    the command line, &aptitude; will attempt to upgrade every
	    package that can be upgraded.  Otherwise, &aptitude; will
	    attempt to upgrade only the packages which it is
	    instructed to upgrade.  The
	    <replaceable>package</replaceable>s can be extended with
	    suffixes in the same manner as arguments to
	    <literal>aptitude install</literal>, so you can also give
	    additional instructions to &aptitude; here; for instance,
	    <literal>aptitude safe-upgrade bash dash-</literal> will
	    attempt to upgrade the <systemitem>bash</systemitem>
	    package and remove the <systemitem>dash</systemitem>
	    package.
	  </para>

	  <para>
	      It is sometimes necessary to remove one package in order
	      to upgrade another; this command is not able to upgrade
	      packages in such situations.  Use the <link
	      linkend='manpageFullUpgrade'><literal>full-upgrade</literal></link>
	      command to upgrade as many packages as possible.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='manpageFullUpgrade'>
	<term><literal>full-upgrade</literal></term>

	<listitem>
	  <para>
	    Upgrades installed packages to their most recent version,
	    removing or installing packages as necessary.  It also installs new
	    Essential or Required packages.  This command is less conservative
	    than <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    and thus more likely to perform unwanted actions.
	    However, it is capable of upgrading packages that <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    cannot upgrade.
	  </para>

	  <para>
	    If no <replaceable>package</replaceable>s are listed on
	    the command line, &aptitude; will attempt to upgrade every
	    package that can be upgraded.  Otherwise, &aptitude; will
	    attempt to upgrade only the packages which it is
	    instructed to upgrade.  The
	    <replaceable>package</replaceable>s can be extended with
	    suffixes in the same manner as arguments to
	    <literal>aptitude install</literal>, so you can also give
	    additional instructions to &aptitude; here; for instance,
	    <literal>aptitude full-upgrade bash dash-</literal> will
	    attempt to upgrade the <systemitem>bash</systemitem>
	    package and remove the <systemitem>dash</systemitem>
	    package.
	  </para>

	  <note>
	    <para>
	      This command was originally named
	      <literal>dist-upgrade</literal> for historical reasons,
	      and &aptitude; still recognizes
	      <literal>dist-upgrade</literal> as a synonym for
	      <literal>full-upgrade</literal>.
	    </para>
	  </note>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineSearch'>
	<term><literal>search</literal></term>

	<listitem>
	  <para>
	    Searches for packages matching one of the patterns
	    supplied on the command line.  All packages which
	    match any of the given patterns will be displayed; for
	    instance, <quote><literal>aptitude search
	    '~N' edit</literal></quote> will list all <quote>new</quote> packages and all packages whose name contains <quote>edit</quote>.  For more information on
	    search patterns, see the section <quote><link
	    linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference
	    manual.
	  </para>

          <note>
            <para>
              In the example above, <quote><literal>aptitude search
              '~N' edit</literal></quote> has two arguments after
              <literal>search</literal> and thus is searching for
              <emphasis>two</emphasis> patterns:
              <quote><literal>~N</literal></quote> and
              <quote><literal>edit</literal></quote>.  As described in
              the <link linkend='secSearchPatterns'>search pattern
              reference</link>, a <emphasis>single</emphasis> pattern
              composed of two sub-patterns separated by a space (such
              as <quote><literal>~N edit</literal></quote>) matches
              only if <emphasis>both</emphasis> patterns match.  Thus,
              the command <quote><literal>aptitude search '~N
              edit'</literal></quote> will only show
              <quote>new</quote> packages whose name contains
              <quote>edit</quote>.
            </para>
          </note>

	  <para>
	    Unless you pass the <link
	    linkend='cmdlineOptionFormat'><literal>-F</literal></link> option, the output of
	    <literal>aptitude search</literal> will look something
	    like this:
	  </para>

	  <screen>i   apt                             - Advanced front-end for dpkg
pi  apt-build                       - frontend to apt to build, optimize and in
cp  apt-file                        - APT package searching utility -- command-
ihA raptor-utils                    - Raptor RDF Parser utilities</screen>

          <para>
	    Each search result is listed on a separate line.  The
	    first character of each line indicates the current state
	    of the package: the most common states are
	    <literal>p</literal>, meaning that no trace of the package
	    exists on the system, <literal>c</literal>, meaning that
	    the package was deleted but its configuration files remain
	    on the system, <literal>i</literal>, meaning that the
	    package is installed, and <literal>v</literal>, meaning
	    that the package is virtual.  The second character
	    indicates the stored action (if any; otherwise a blank
	    space is displayed) to be performed on the package, with
	    the most common actions being <literal>i</literal>,
	    meaning that the package will be installed,
	    <literal>d</literal>, meaning that the package will be
	    deleted, and <literal>p</literal>, meaning that the
	    package and its configuration files will be removed.  If
	    the third character is <literal>A</literal>, the package
	    was automatically installed.
	  </para>

	  <para>
	    For a complete list of the possible state and action
	    flags, see the section <quote><link
	    linkend='secAccessingPackageInformation'>Accessing Package
	    Information</link></quote> in the &aptitude; reference
	    guide.  To customize the output of
	    <literal>search</literal>, see the command-line options
	    <link
	    linkend='cmdlineOptionFormat'><literal>-F</literal></link>
	    and <link
	    linkend='cmdlineOptionSort'><literal>--sort</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>show</literal></term>

	<listitem>
	  <para>
	    Displays detailed information about one or more packages.  If a
	    package name contains a tilde character
	    (<quote><literal>~</literal></quote>) or a question mark
	    (<quote><literal>?</literal></quote>), it will be treated as a
	    search pattern and all matching packages will be displayed (see the
	    section <quote><link linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference manual).
	  </para>

	  <para>
	    If the verbosity level is 1 or greater (i.e., at least one <literal>-v</literal>
	    is present on the command-line), information about all
	    versions of the package is displayed.  Otherwise, information about
	    the <quote>candidate version</quote> (the version
	    that <quote><literal>aptitude install</literal></quote>
	    would download) is displayed.
	  </para>

	  <para>
	    You can display information about a different version of
	    the package by appending
	    <literal>=<replaceable>version</replaceable></literal> to
	    the package name; you can display the version from a
	    particular archive or release by appending
	    <literal>/<replaceable>archive</replaceable></literal> or
	    <literal>/<replaceable>release</replaceable></literal> to
	    the package name: for instance,
	    <literal>/unstable</literal> or <literal>/sid</literal>.
	    If either of these is present, then only the version you
	    request will be displayed, regardless of the verbosity
	    level.
	  </para>

	  <para>
	    If the verbosity level is 1 or greater, the package's
	    architecture, compressed size, filename, and md5sum fields
	    will be displayed.  If the verbosity level is 2 or
	    greater, the select version or versions will be displayed
	    once for each archive in which they are found.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>showsrc</literal></term>

	<listitem>
	  <para>
	    Displays detailed information about one or more source packages.
	  </para>

	  <para>
	    This is a thin wrapper over
	    <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>source</literal></term>

	<listitem>
	  <para>
	    Downloads one or more source packages.
	  </para>

	  <para>
	    This is a thin wrapper over
	    <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineVersions'>
        <term><literal>versions</literal></term>

        <listitem>
          <para>
            Displays the versions of the packages listed on the
            command-line.
          </para>

          <screen>$ aptitude versions wesnoth
p   1:1.4.5-1                                                             100
p   1:1.6.5-1                                    unstable                 500
p   1:1.7.14-1                                   experimental             1</screen>

          <para>
            Each version is listed on a separate line.  The leftmost
            three characters indicate the current state, planned state
            (if any), and whether the package was automatically
            installed; for more information on their meanings, see
            <link linkend='cmdlineSearch'>the documentation of
            <literal>aptitude search</literal></link>.  To the right
            of the version number you can find the releases from which
            the version is available, and the pin priority of the
            version.
          </para>

          <para>
            If a package name contains a tilde character
            (<quote><literal>~</literal></quote>) or a question mark
            (<quote><literal>?</literal></quote>), it will be treated
            as a search pattern and all matching
            <emphasis>versions</emphasis> will be displayed (see the
            section <quote><link linkend='secSearchPatterns'>Search
            Patterns</link></quote> in the &aptitude; reference
            manual).  This means that, for instance, <literal>aptitude
            versions '~i'</literal> will display all the versions that
            are currently installed on the system and nothing else,
            not even other versions of the same packages.
          </para>

          <screen>$ aptitude versions '~nexim4-daemon-light'
Package exim4-daemon-light:
i   4.71-3                                                                100
p   4.71-4                                       unstable                 500

Package exim4-daemon-light-dbg:
p   4.71-4                                       unstable                 500</screen>

          <para>
            If the input is a search pattern, or if more than one
            package's versions are to be displayed, &aptitude; will
            automatically group the output by package, as shown above.
            You can disable this via <literal><link
            linkend='cmdlineGroupBy'>--group-by</link>=none</literal>,
            in which case &aptitude; will display a single list of all
            the versions that were found and automatically include the
            package name in each output line:
          </para>

          <screen>$ aptitude versions --group-by=none '~nexim4-daemon-light'
i   exim4-daemon-light 4.71-3                                             100
p   exim4-daemon-light 4.71-4                    unstable                 500
p   exim4-daemon-light-dbg 4.71-4                unstable                 500</screen>

          <para>
            To disable the package name, pass
            <literal><link linkend='cmdlineShowPackageNames'>--show-package-names</link>=never</literal>:
          </para>

          <screen>$ aptitude versions --show-package-names=never --group-by=none '~nexim4-daemon-light'
i   4.71-3                                                                100
p   4.71-4                                       unstable                 500
p   4.71-4                                       unstable                 500</screen>


          <para>
            In addition to the above options, the information printed
            for each version can be controlled by the command-line
            option <link
            linkend='cmdlineOptionFormat'><literal>-F</literal></link>.
            The order in which versions are displayed can be
            controlled by the command-line option <link
            linkend='cmdlineOptionSort'><literal>--sort</literal></link>.
            To prevent &aptitude; from formatting the output into
            columns, use <link
            linkend='cmdlineOptionDisableColumns'><literal>--disable-columns</literal></link>.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry id='cmdlineAddOrRemoveUserTags'>
	<term><literal>add-user-tag</literal>, <literal>remove-user-tag</literal></term>

	<listitem>
	  <para>
	    Adds a user tag to or removes a user tag from the selected
	    group of packages.  If a package name contains a tilde
	    (<quote><literal>~</literal></quote>) or question mark
	    (<quote><literal>?</literal></quote>), it is treated as a
	    search pattern and the tag is added to or removed from all
	    the packages that match the pattern (see the section
	    <quote><link linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference
	    manual).
	  </para>

	  <para>
	    User tags are arbitrary strings associated with a package.
	    They can be used with the <link
	    linkend='searchUserTag'><literal>?user-tag(<replaceable>tag</replaceable>)</literal></link>
	    search term, which will select all the packages that have
	    a user tag matching <replaceable>tag</replaceable>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>why</literal>, <literal>why-not</literal></term>

	<listitem>
	  <para>
	    Explains the reason that a particular package should or
	    cannot be installed on the system.
	  </para>

	  <para>
	    This command searches for packages that require or
	    conflict with the given package.  It displays a sequence
	    of dependencies leading to the target package, along with
	    a note indicating the installed state of each package in
	    the dependency chain:
	  </para>

	  <screen>$ aptitude why kdepim
i   nautilus-data Recommends nautilus
i A nautilus      Recommends desktop-base (>= 0.2)
i A desktop-base  Suggests   gnome | kde | xfce4 | wmaker
p   kde           Depends    kdepim (>= 4:3.4.3)</screen>

	  <para>
	    The command <literal>why</literal> finds a dependency
	    chain that installs the package named on the command line,
	    as above.  Note that the dependency that &aptitude; produced
	    in this case is only a suggestion.  This is because no
	    package currently installed on this computer depends on or
	    recommends the <systemitem>kdepim</systemitem> package; if
	    a stronger dependency were available, &aptitude; would have
	    displayed it.
	  </para>

	  <para>
	    In contrast, <literal>why-not</literal> finds a
	    dependency chain leading to a conflict
	    with the target package:
	  </para>

	  <screen>$ aptitude why-not textopo
i   ocaml-core          Depends   ocamlweb
i A ocamlweb            Depends   tetex-extra | texlive-latex-extra
i A texlive-latex-extra Conflicts textopo</screen>

	  <para>
	    If one or more <replaceable>pattern</replaceable>s are present (in
	    addition to the mandatory last argument, which should be a valid
	    <replaceable>package</replaceable> name), then &aptitude; will begin
	    its search at these patterns.  That is, the first package in the
	    chain it prints to explain why <replaceable>package</replaceable> is
	    or is not installed, will be a package matching the pattern in
	    question.  The patterns are considered to be package names unless
	    they contain a tilde character (<quote><literal>~</literal></quote>)
	    or a question mark (<quote><literal>?</literal></quote>), in which
	    case they are treated as search patterns (see the section
	    <quote><link linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference manual).
	  </para>

	  <para>
	    If no patterns are present, then &aptitude; will search
	    for dependency chains beginning at manually installed
	    packages.  This effectively shows the packages that have
	    caused or would cause a given package to be installed.
	  </para>

	  <note>
	    <para>
	      <literal>aptitude why</literal> does not perform full
	      dependency resolution; it only displays direct
	      relationships between packages.  For instance, if A
	      requires B, C requires D, and B and C conflict,
	      <quote><literal>aptitude why-not D</literal></quote>
	      will not produce the answer <quote>A depends on B, B
	      conflicts with C, and D depends on C</quote>.
	    </para>
	  </note>

	  <para>
	    By default &aptitude; outputs only the <quote>most
	    installed, strongest, tightest, shortest</quote>
	    dependency chain.  That is, it looks for a chain that only
	    contains packages which are installed or will be
	    installed; it looks for the strongest possible
	    dependencies under that restriction; it looks for chains
	    that avoid ORed dependencies and Provides; and it looks
	    for the shortest dependency chain meeting those criteria.
	    These rules are progressively weakened until a match is
	    found.
	  </para>

	  <para>
	    If the verbosity level is 1 or more, then
	    <emphasis>all</emphasis> the explanations &aptitude; can
	    find will be displayed, in inverse order of relevance.  If
	    the verbosity level is 2 or more, a truly excessive amount
	    of debugging information will be printed to standard
	    output.
	  </para>

	  <para>
	    This command returns 0 if successful, 1 if no explanation
	    could be constructed, and -1 if an error occurred.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>clean</literal></term>

	<listitem>
	  <para>
	    Removes all previously downloaded <literal>.deb</literal> files from the package cache
	    directory (usually <filename>/var/cache/apt/archives</filename>).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>autoclean</literal></term>

	<listitem>
	  <para>
	    Removes any cached packages which can no longer be
	    downloaded.  This allows you to prevent a cache from
	    growing out of control over time without completely
	    emptying it.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>changelog</literal></term>

	<listitem>
	  <para>
	    Downloads and displays the Debian changelog for each of
	    the given source or binary packages.
	  </para>

	  <para>
	    By default, the changelog for the version which would be
	    installed with <quote><literal>aptitude
	    install</literal></quote> is downloaded.  You can select a
	    particular version of a package by appending
	    <literal>=<replaceable>version</replaceable></literal> to
	    the package name; you can select the version from a
	    particular archive or release by appending
	    <literal>/<replaceable>archive</replaceable></literal> or
	    <literal>/<replaceable>release</replaceable></literal> to
	    the package name (for instance,
	    <literal>/unstable</literal> or <literal>/sid</literal>).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>download</literal></term>

	<listitem>
	  <para>
	    Downloads the <literal>.deb</literal> file for the given
	    package to the current directory.
	  </para>

	  <para>
	    This is a thin wrapper over
	    <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>extract-cache-subset</literal></term>

	<listitem>
	  <para>
	    Copy the &apt; configuration directory
	    (<literal>/etc/apt</literal>) and a subset of the package
	    database to the specified directory.  If no packages are
	    listed, the entire package database is copied; otherwise
	    only the entries corresponding to the named packages are
	    copied.  Each package name may be a search pattern, and
	    all the packages matching that pattern will be selected
	    (see the section <quote><link
	    linkend='secSearchPatterns'>Search Patterns</link></quote>
	    in the &aptitude; reference manual).  Any existing package
	    database files in the output directory will be
	    overwritten.
	  </para>

	  <para>
	    Dependencies in binary package stanzas will be rewritten
	    to remove references to packages not in the selected set.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>help</literal></term>

	<listitem>
	  <para>
	    Displays a brief summary of the available commands and
	    options.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <para>
      The following options may be used to modify the behavior of
      the actions described above.  Note that while all options
      will be accepted for all commands, some options don't apply
      to particular commands and will be ignored by those
      commands.
    </para>

    <variablelist>

      <varlistentry>
	<term><literal>--add-user-tag <replaceable>tag</replaceable></literal></term>

	<listitem>
	  <para>
	    For <literal>full-upgrade</literal>,
	    <literal>safe-upgrade</literal>, <literal>forbid-version</literal>,
	    <literal>hold</literal>, <literal>install</literal>,
	    <literal>keep-all</literal>, <literal>markauto</literal>,
	    <literal>unmarkauto</literal>, <literal>purge</literal>,
	    <literal>reinstall</literal>, <literal>remove</literal>,
	    <literal>unhold</literal>, and <literal>unmarkauto</literal>: add
	    the user tag <replaceable>tag</replaceable> to all packages that are
	    installed, removed, or upgraded by this command as if with the <link
	    linkend='cmdlineAddOrRemoveUserTags'><literal>add-user-tag</literal></link>
	    command.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--add-user-tag-to <replaceable>tag</replaceable>,<replaceable>pattern</replaceable></literal></term>

	<listitem>
	  <para>
	    For <literal>full-upgrade</literal>,
	    <literal>safe-upgrade</literal>, <literal>forbid-version</literal>,
	    <literal>hold</literal>, <literal>install</literal>,
	    <literal>keep-all</literal>, <literal>markauto</literal>,
	    <literal>unmarkauto</literal>, <literal>purge</literal>,
	    <literal>reinstall</literal>, <literal>remove</literal>,
	    <literal>unhold</literal>, and <literal>unmarkauto</literal>: add
	    the user tag <replaceable>tag</replaceable> to all packages that
	    match <replaceable>pattern</replaceable> as if with the <link
	    linkend='cmdlineAddOrRemoveUserTags'><literal>add-user-tag</literal></link>
	    command.  The pattern is a search pattern as described in the
	    section <quote><link linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference manual.
	  </para>

	  <para>
	    For instance, <literal>aptitude safe-upgrade
	    --add-user-tag-to "new-installs,?action(install)"</literal>
	    will add the tag <literal>new-installs</literal> to all
	    the packages installed by the <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    command.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--allow-new-upgrades</literal></term>

	<listitem>
	  <para>
	    When the safe resolver is being used (i.e., <link
	    linkend='cmdlineSafeResolver'><literal>--safe-resolver</literal></link>
	    was passed, the action is <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>,
	    or <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    is set to <literal>true</literal>), allow the dependency
	    resolver to install upgrades for packages regardless of
	    the value of <link
	    linkend='configSafe-Resolver-No-New-Upgrades'><literal>Aptitude::Safe-Resolver::No-New-Upgrades</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--allow-new-installs</literal></term>

	<listitem>
	  <para>
	    Allow the <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    command to install new packages; when the safe resolver is
	    being used (i.e., <link
	    linkend='cmdlineSafeResolver'><literal>--safe-resolver</literal></link>
	    was passed, the action is <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>,
	    or <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    is set to <literal>true</literal>), allow the dependency
	    resolver to install new packages.  This option takes
	    effect regardless of the value of <link
	    linkend='configSafe-Resolver-No-New-Installs'><literal>Aptitude::Safe-Resolver::No-New-Installs</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--allow-untrusted</literal></term>

	<listitem>
	  <para>
	    Install packages from untrusted sources without prompting.
	    You should only use this if you know what you are doing,
	    as it could easily compromise your system's security.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionDisableColumns'>
	<term><literal>--disable-columns</literal></term>

	<listitem>
	  <para>
	    This option causes <literal>aptitude search</literal> and
	    <literal>aptitude versions</literal> to
	    output their results without any special formatting.  In
	    particular: normally &aptitude; will add whitespace or
	    truncate search results in an attempt to fit its results
	    into vertical <quote>columns</quote>.  With this flag,
	    each line will be formed by replacing any format escapes
	    in the format string with the corresponding text; column
	    widths will be ignored.
	  </para>

	  <para>
	    For instance, the first few lines of output from <quote><literal>aptitude search -F '%p %V' --disable-columns libedataserver</literal></quote> might be:
	  </para>

	  <screen>disksearch 1.2.1-3
hp-search-mac 0.1.3
libbsearch-ruby 1.5-5
libbsearch-ruby1.8 1.5-5
libclass-dbi-abstractsearch-perl 0.07-2
libdbix-fulltextsearch-perl 0.73-10</screen>

          <para>
            As in the above example,
            <literal>--disable-columns</literal> is often useful in
            combination with a custom display format set using the
            command-line option <link
            linkend='cmdlineOptionFormat'><literal>-F</literal></link>.
	  </para>

	  <para>
	    This corresponds to the configuration option
	    <literal><link
	    linkend='configCmdLine-Disable-Columns'>Aptitude::CmdLine::Disable-Columns</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-D</literal>, <literal>--show-deps</literal></term>

	<listitem>
	  <para>
	    For commands that will install or remove packages
	    (<literal>install</literal>, <link
	    linkend='manpageFullUpgrade'><literal>full-upgrade</literal></link>,
	    etc), show brief explanations of automatic installations
	    and removals.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Deps'>Aptitude::CmdLine::Show-Deps</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-d</literal>, <literal>--download-only</literal></term>

	<listitem>
	  <para>
	    Download packages to the package cache as necessary, but
	    do not install or remove anything.  By default, the
	    package cache is stored in
	    <filename>/var/cache/apt/archives</filename>.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configCmdLine-Download-Only'>Aptitude::CmdLine::Download-Only</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionFormat'>
	<term>
	  <literal>-F</literal> <replaceable>format</replaceable>, <literal>--display-format</literal> <replaceable>format</replaceable>
	</term>

	<listitem>
	  <para>
	    Specify the format which should be used to display
	    output from the <literal>search</literal> and
            <literal>versions</literal> commands.
	    For instance, passing <quote><literal>%p %v %V</literal></quote>
	    for <replaceable>format</replaceable> will display a package's name,
	    followed by its currently installed version and its
	    candidate version (see the section <quote><link linkend='secDisplayFormat'>Customizing how packages are displayed</link></quote> in the &aptitude; reference manual for more information).
	  </para>

	  <para>
	    The command-line option <link
	    linkend='cmdlineOptionDisableColumns'><literal>--disable-columns</literal></link>
	    is often useful in combination with <literal>-F</literal>.
	  </para>

	  <para>
	    For <literal>search</literal>, this corresponds to the configuration option <literal><link linkend='configCmdLine-Package-Display-Format'>Aptitude::CmdLine::Package-Display-Format</link></literal>;
            for <literal>versions</literal>, this corresponds to the
            configuration option <literal><link linkend='configCmdLine-Version-Display-Format'>Aptitude::CmdLine::Version-Display-Format</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-f</literal></term>

	<listitem>
	  <para>
	    Try hard to fix the dependencies of broken packages, even
	    if it means ignoring the actions requested on the command
	    line.
	  </para>

	  <para>
	    This corresponds to the configuration item <literal><link linkend='configCmdLine-Fix-Broken'>Aptitude::CmdLine::Fix-Broken</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineFullResolver'>
	<term><literal>--full-resolver</literal></term>

	<listitem>
	  <para>
	    When package dependency problems are encountered, use the
	    default <quote>full</quote> resolver to solve them.
	    Unlike the <quote>safe</quote> resolver activated by <link
	    linkend='cmdlineSafeResolver'><literal>--safe-resolver</literal></link>,
	    the full resolver will happily remove packages to fulfill
	    dependencies.  It can resolve more situations than the
	    safe algorithm, but its solutions are more likely to be
	    undesirable.
	  </para>

	  <para>
	    This option can be used to force the use of the full
	    resolver even when <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    is true.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineGroupBy'>
        <term>
          <literal>--group-by</literal> <replaceable>grouping-mode</replaceable>
        </term>

        <listitem>
          <para>
            Control how the <link
            linkend='cmdlineVersions'><literal>versions</literal></link>
            command groups its output.  The following values are
            recognized:
          </para>

          <itemizedlist>
            <listitem>
              <para>
                <literal>archive</literal> to group packages by the
                archive they occur in
                (<quote><literal>stable</literal></quote>,
                <quote><literal>unstable</literal></quote>, etc).  If
                a package occurs in several archives, it will be
                displayed in each of them.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>auto</literal> to group versions by their
                package unless there is exactly one argument and it is
                not a search pattern.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>none</literal> to display all the versions in
                a single list without any grouping.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>package</literal> to group versions by their
                package.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>source-package</literal> to group versions by
                their source package.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>source-version</literal> to group versions by
                their source package and source version.
              </para>
            </listitem>
          </itemizedlist>

          <para>
            This corresponds to the configuration option
            <literal><link
            linkend='configCmdLine-Versions-Group-By'>Aptitude::CmdLine::Versions-Group-By</link></literal>.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <literal>-h</literal>, <literal>--help</literal>
	</term>

	<listitem>
	  <para>
	    Display a brief help message.  Identical to the <literal>help</literal> action.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionLogFile'>
	<term>
	  <literal>--log-file=<replaceable>file</replaceable></literal>
	</term>

	<listitem>
	  <para>
	    If <replaceable>file</replaceable> is a nonempty string,
	    log messages will be written to it, except that if
	    <replaceable>file</replaceable> is
	    <quote><literal>-</literal></quote>, the messages will be
	    written to standard output instead.  If this option
	    appears multiple times, the last occurrence is the one
	    that will take effect.
	  </para>

	  <para>
	    This does not affect the log of installations that
	    &aptitude; has performed
	    (<filename>/var/log/aptitude</filename>); the log messages
	    written using this configuration include internal program
	    events, errors, and debugging messages.  See the
	    command-line option <link
	    linkend='cmdlineOptionLogLevel'><literal>--log-level</literal></link>
	    to get more control over what gets logged.
	  </para>

	  <para>
	    This corresponds to the configuration option <link
	    linkend='configLoggingFile'><literal>Aptitude::Logging::File</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionLogLevel'>
	<term>
	  <literal>--log-level=<replaceable>level</replaceable></literal>, <literal>--log-level=<replaceable>category</replaceable>:<replaceable>level</replaceable></literal>
	</term>

	<listitem>
	  <para>
	    <literal>--log-level=<replaceable>level</replaceable></literal>
	    causes &aptitude; to only log messages whose level is
	    <replaceable>level</replaceable> or higher.  For instance,
	    setting the log level to <literal>error</literal> will
	    cause only messages at the log levels
	    <literal>error</literal> and <literal>fatal</literal> to
	    be displayed; all others will be hidden.  Valid log levels
	    (in descending order) are <literal>off</literal>,
	    <literal>fatal</literal>, <literal>error</literal>,
	    <literal>warn</literal>, <literal>info</literal>,
	    <literal>debug</literal>, and <literal>trace</literal>.
	    The default log level is <literal>warn</literal>.
	  </para>

	  <para>
	    <literal>--log-level=<replaceable>category</replaceable>:<replaceable>level</replaceable></literal>
	    causes messages in <replaceable>category</replaceable> to
	    only be logged if their level is
	    <replaceable>level</replaceable> or higher.
	  </para>

	  <para>
	    <literal>--log-level</literal> may appear multiple times
	    on the command line; the most specific setting is the one
	    that takes effect, so if you pass
	    <literal>--log-level=aptitude.resolver:fatal</literal> and
	    <literal>--log-level=aptitude.resolver.hints.match:trace</literal>,
	    then messages in
	    <literal>aptitude.resolver.hints.parse</literal> will only
	    be printed if their level is <literal>fatal</literal>, but
	    all messages in
	    <literal>aptitude.resolver.hints.match</literal> will be
	    printed.  If you set the level of the same category two or
	    more times, the last setting is the one that will take
	    effect.
	  </para>

	  <para>
	    This does not affect the log of installations that
	    &aptitude; has performed
	    (<filename>/var/log/aptitude</filename>); the log messages
	    written using this configuration include internal program
	    events, errors, and debugging messages.  See the
	    command-line option <link
	    linkend='cmdlineOptionLogLevel'><literal>--log-file</literal></link>
	    to change where log messages go.
	  </para>

	  <para>
	    This corresponds to the configuration group <link
	    linkend='configLoggingLevels'><literal>Aptitude::Logging::Levels</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionLogResolver'>
	<term>
	  <literal>--log-resolver</literal>
	</term>

	<listitem>
	  <para>
	    Set some standard log levels related to the resolver, to
	    produce logging output suitable for processing with
	    automated tools.  This is equivalent to the command-line
	    options
	    <literal>--log-level=aptitude.resolver.search:trace
	    --log-level=aptitude.resolver.search.tiers:info</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionNoNewInstalls'>
	<term>
	  <literal>--no-new-installs</literal>
	</term>

	<listitem>
	  <para>
	    Prevent <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    from installing any new packages; when the safe resolver
	    is being used (i.e., <link
	    linkend='cmdlineSafeResolver'><literal>--safe-resolver</literal></link>
	    was passed or <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    is set to <literal>true</literal>), forbid the dependency
	    resolver from installing new packages.  This option takes
	    effect regardless of the value of <link
	    linkend='configSafe-Resolver-No-New-Installs'><literal>Aptitude::Safe-Resolver::No-New-Installs</literal></link>.
	  </para>

	  <para>
	    This mimics the historical behavior of <command>apt-get
	    upgrade</command>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--no-new-upgrades</literal></term>

	<listitem>
	  <para>
	    When the safe resolver is being used (i.e., <link
	    linkend='cmdlineSafeResolver'><literal>--safe-resolver</literal></link>
	    was passed or <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    is set to <literal>true</literal>), forbid the dependency
	    resolver from installing upgrades for packages
            regardless of the value of <link
	    linkend='configSafe-Resolver-No-New-Upgrades'><literal>Aptitude::Safe-Resolver::No-New-Upgrades</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionNoShowResolverActions'>
	<term><literal>--no-show-resolver-actions</literal></term>

	<listitem>
	  <para>
	    Do not display the actions performed by the
	    <quote>safe</quote> resolver, overriding any configuration
	    option or earlier
	    <link linkend='cmdlineOptionShowResolverActions'><literal>--show-resolver-actions</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionSort'>
	<term><literal>-O</literal> <replaceable>order</replaceable>, <literal>--sort</literal> <replaceable>order</replaceable></term>

	<listitem>
	  <para>
	    Specify the order in which output from the <link linkend='cmdlineSearch'><literal>search</literal></link> and <link linkend='cmdlineVersions'><literal>versions</literal></link>
	    commands should be displayed.  For instance, passing <quote><literal>installsize</literal></quote>
	    for <replaceable>order</replaceable> will list packages in
	    order according to their size when installed (see the section <quote><link linkend='secSortingPolicy'>Customizing how packages are sorted</link></quote> in the &aptitude; reference manual for more information).
	  </para>

          <para>
            Prepending the order keyword with a tilde character
            (<literal>~</literal>) reverses the order from ascending
            to descending.
          </para>

          <para>
            The default sort order is <literal>name,version</literal>.
          </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-o</literal> <replaceable>key</replaceable><literal>=</literal><replaceable>value</replaceable></term>

	<listitem>
	  <para>
	    Set a configuration file option directly; for
	    instance, use <literal>-o
	    Aptitude::Log=/tmp/my-log</literal> to log &aptitude;'s
	    actions to <filename>/tmp/my-log</filename>.  For more
	    information on configuration file options, see the
	    section <quote><link
	    linkend='secConfigFile'>Configuration file
	    reference</link></quote> in the &aptitude; reference manual.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-P</literal>, <literal>--prompt</literal></term>

	<listitem>
	  <para>
	    Always display a prompt before downloading, installing or
	    removing packages, even when no actions other than those
	    explicitly requested will be performed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configCmdLine-Always-Prompt'>Aptitude::CmdLine::Always-Prompt</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--purge-unused</literal></term>

	<listitem>
	  <para>
	    If <literal><link
	    linkend='configDelete-Unused'>Aptitude::Delete-Unused</link></literal>
	    is set to <quote><literal>true</literal></quote> (its
	    default), then in addition to removing each package that
	    is no longer required by any installed package, &aptitude;
	    will also purge them, removing their configuration files
	    and perhaps other important data.  For more information
	    about which packages are considered to be
	    <quote>unused</quote>, see the section <quote><link
	    linkend='secAutoInstall'>Managing Automatically Installed
	    Packages</link></quote> in the &aptitude; reference
	    manual.  <emphasis>THIS OPTION CAN CAUSE DATA LOSS!  DO
	    NOT USE IT UNLESS YOU KNOW WHAT YOU ARE DOING!</emphasis>
	  </para>

	  <para>
	    This corresponds to the configuration option
	    <literal><link
	    linkend='configPurge-Unused'>Aptitude::Purge-Unused</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-q<optional>=<replaceable>n</replaceable></optional></literal>, <literal>--quiet<optional>=<replaceable>n</replaceable></optional></literal></term>

	<listitem>
	  <para>
	    Suppress all incremental progress indicators, thus making
	    the output loggable.  This may be supplied multiple times
	    to make the program quieter, but unlike &apt-get;,
	    &aptitude; does not enable <literal>-y</literal> when <literal>-q</literal>
	    is supplied more than once.
	  </para>


	  <para>
	    The optional <literal>=<replaceable>n</replaceable></literal>
	    may be used to directly set the amount of quietness (for
	    instance, to override a setting in <filename>/etc/apt/apt.conf</filename>);
	    it causes the program to behave as if <literal>-q</literal>
	    had been passed exactly <replaceable>n</replaceable>
	    times.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-R</literal>, <literal>--without-recommends</literal></term>

	<listitem>
	  <para>
	    Do <emphasis>not</emphasis> treat recommendations as
	    dependencies when installing new packages (this overrides settings in <filename>/etc/apt/apt.conf</filename> and <filename>~/.aptitude/config</filename>).
	    Packages previously installed due to recommendations
	    will not be removed.
	  </para>

	  <para>
	    This corresponds to the pair of configuration options <literal><link linkend='configAptInstall-Recommends'>APT::Install-Recommends</link></literal> and <literal><link linkend='configApt-AutoRemove-RecommendsImportant'>APT::AutoRemove::RecommendsImportant</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-r</literal>, <literal>--with-recommends</literal></term>

	<listitem>
	  <para>
	    Treat recommendations as dependencies when installing
	    new packages (this overrides settings in <filename>/etc/apt/apt.conf</filename> and <filename>~/.aptitude/config</filename>).
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configAptInstall-Recommends'>APT::Install-Recommends</link></literal>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--remove-user-tag <replaceable>tag</replaceable></literal></term>

	<listitem>
	  <para>
	    For <literal>full-upgrade</literal>,
	    <literal>safe-upgrade</literal>
	    <literal>forbid-version</literal>,
	    <literal>hold</literal>, <literal>install</literal>,
	    <literal>keep-all</literal>, <literal>markauto</literal>,
	    <literal>unmarkauto</literal>, <literal>purge</literal>,
	    <literal>reinstall</literal>, <literal>remove</literal>,
	    <literal>unhold</literal>, and
	    <literal>unmarkauto</literal>: remove the user tag
	    <replaceable>tag</replaceable> from all packages that are
	    installed, removed, or upgraded by this command as if with
	    the <link
	    linkend='cmdlineAddOrRemoveUserTags'><literal>add-user-tag</literal></link>
	    command.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--remove-user-tag-from <replaceable>tag</replaceable>,<replaceable>pattern</replaceable></literal></term>

	<listitem>
	  <para>
	    For <literal>full-upgrade</literal>,
	    <literal>safe-upgrade</literal>
	    <literal>forbid-version</literal>,
	    <literal>hold</literal>, <literal>install</literal>,
	    <literal>keep-all</literal>, <literal>markauto</literal>,
	    <literal>unmarkauto</literal>, <literal>purge</literal>,
	    <literal>reinstall</literal>, <literal>remove</literal>,
	    <literal>unhold</literal>, and
	    <literal>unmarkauto</literal>: remove the user tag
	    <replaceable>tag</replaceable> from all packages that
	    match <replaceable>pattern</replaceable> as if with the
	    <link
	    linkend='cmdlineAddOrRemoveUserTags'><literal>remove-user-tag</literal></link>
	    command.  The pattern is a search pattern as described in
	    the section <quote><link
	    linkend='secSearchPatterns'>Search Patterns</link></quote>
	    in the &aptitude; reference manual.
	  </para>

	  <para>
	    For instance, <literal>aptitude safe-upgrade
	    --remove-user-tag-from
	    "not-upgraded,?action(upgrade)"</literal> will remove the
	    <literal>not-upgraded</literal> tag from all packages that
	    the <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    command is able to upgrade.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-s</literal>, <literal>--simulate</literal></term>

	<listitem>
	  <para>
	    In command-line mode, print the actions that would
	    normally be performed, but don't actually perform them.
	    This does not require &root; privileges.  In the visual
	    interface, always open the cache in read-only mode
	    regardless of whether you are &root;.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configSimulate'>Aptitude::Simulate</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineSafeResolver'>
	<term><literal>--safe-resolver</literal></term>

	<listitem>
	  <para>
	    When package dependency problems are encountered, use a
	    <quote>safe</quote> algorithm to solve them.  This
	    resolver attempts to preserve as many of your choices as
	    possible; it will never remove a package or install a
	    version of a package other than the package's default
	    candidate version.  It is the same algorithm used in <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>;
	    indeed, <literal>aptitude --safe-resolver
	    full-upgrade</literal> is equivalent to <literal>aptitude
	    safe-upgrade</literal>.  Because
	    <literal>safe-upgrade</literal> always uses the safe
	    resolver, it does not accept the
	    <literal>--safe-resolver</literal> flag.
	  </para>

	  <para>
	    This option is equivalent to setting the configuration
	    variable <link
	    linkend='configAlways-Use-Safe-Resolver'><literal>Aptitude::Always-Use-Safe-Resolver</literal></link>
	    to <literal>true</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--schedule-only</literal></term>

	<listitem>
	  <para>
	    For commands that modify package states, schedule
	    operations to be performed in the future, but don't
	    perform them.  You can execute scheduled actions by
	    running <literal>aptitude install</literal> with no
	    arguments.  This is equivalent to making the corresponding
	    selections in <link linkend='secUsingVisual'>visual
	    mode</link>, then exiting the program normally.
	  </para>

	  <para>
	    For instance, <literal>aptitude --schedule-only install
	    evolution</literal> will schedule the
	    <literal>evolution</literal> package for later
	    installation.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineShowPackageNames'>
        <term><literal>--show-package-names</literal> <replaceable>when</replaceable></term>

        <listitem>
          <para>
            Controls when the <link
            linkend='cmdlineVersions'><literal>versions</literal></link>
            command shows package names.  The following settings are
            allowed:
          </para>

          <itemizedlist>
            <listitem>
              <para>
                <literal>always</literal>: display package names every
                time that <literal>aptitude versions</literal> runs.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>auto</literal>: display package names when
                <literal>aptitude versions</literal> runs if the
                output is not grouped by package, and either there is
                a pattern-matching argument or there is more than one
                argument.
              </para>
            </listitem>

            <listitem>
              <para>
                <literal>never</literal>: never display package names
                in the output of <literal>aptitude versions</literal>.
              </para>
            </listitem>
          </itemizedlist>

          <para>
            This option corresponds to the configuration item <link
            linkend='configCmdLine-Versions-Show-Package-Names'><literal>Aptitude::CmdLine::Versions-Show-Package-Names</literal></link>.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionShowResolverActions'>
	<term><literal>--show-resolver-actions</literal></term>

	<listitem>
	  <para>
	    Display the actions performed by the <quote>safe</quote>
	    resolver and by <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>.
	  </para>

	  <para>
	    When executing the command <link
	    linkend='manpageSafeUpgrade'><literal>safe-upgrade</literal></link>
	    or when the option <link
	    linkend='cmdlineSafeResolver'>--safe-resolver</link> is
	    present, &aptitude; will display a summary of the actions
	    performed by the resolver before printing the installation
	    preview.  This is equivalent to the configuration option <link
            linkend='configSafe-Resolver-Show-Resolver-Actions'><literal>Aptitude::Safe-Resolver::Show-Resolver-Actions</literal></link>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionShowSummary'>
	<term><literal>--show-summary<optional>=<replaceable>MODE</replaceable></optional></literal></term>

	<listitem>
	  <para>
	    Changes the behavior of <quote><literal>aptitude
	    why</literal></quote> to summarize each dependency chain
	    that it outputs, rather than displaying it in long form.
	    If this option is present and
	    <replaceable>MODE</replaceable> is not
	    <quote><literal>no-summary</literal></quote>, chains that
	    contain Suggests dependencies will not be displayed:
	    combine <literal>--show-summary</literal> with
	    <literal>-v</literal> to see a summary of all the reasons
	    for the target package to be installed.
	  </para>

	  <para>
	    <replaceable>MODE</replaceable> can be any one of the
	    following:
	  </para>

	  <orderedlist>
	    <listitem>
	      <para>
		<literal>no-summary</literal>: don't show a summary
		(the default behavior if
		<literal>--show-summary</literal> is not present).
	      </para>
	    </listitem>

	    <listitem>
	      <para>
		<literal>first-package</literal>: display the first
		package in each chain.  This is the default value of
		<replaceable>MODE</replaceable> if it is not present.
	      </para>
	    </listitem>

	    <listitem>
	      <para>
		<literal>first-package-and-type</literal>: display the
		first package in each chain, along with the strength
		of the weakest dependency in the chain.
	      </para>
	    </listitem>

	    <listitem>
	      <para>
		<literal>all-packages</literal>: briefly display each
		chain of dependencies leading to the target package.
	      </para>
	    </listitem>

	     <listitem>
	       <para>
		 <literal>all-packages-with-dep-versions</literal>:
		 briefly display each chain of dependencies leading to
		 the target package, including the target version of
		 each dependency.
	       </para>
	     </listitem>
	  </orderedlist>

	  <para>
	    This option corresponds to the configuration item <link
	    linkend='configCmdLine-Show-Summary'><literal>Aptitude::CmdLine::Show-Summary</literal></link>;
	    if <literal>--show-summary</literal> is present on the
	    command-line, it will override <link
	    linkend='configCmdLine-Show-Summary'><literal>Aptitude::CmdLine::Show-Summary</literal></link>.
	  </para>

	  <example>
	    <title>Usage of <literal>--show-summary</literal></title>

	    <para>
	      <literal>--show-summary</literal> used with
	      <literal>-v</literal> to display all the reasons a
	      package is installed:
	    </para>

	    <screen>$ aptitude -v --show-summary why foomatic-db
Packages requiring foomatic-db:
  cupsys-driver-gutenprint
  foomatic-db-engine
  foomatic-db-gutenprint
  foomatic-db-hpijs
  foomatic-filters-ppds
  foomatic-gui
  kde
  printconf
  wine

$ aptitude -v --show-summary=first-package-and-type why foomatic-db
Packages requiring foomatic-db:
  [Depends] cupsys-driver-gutenprint
  [Depends] foomatic-db-engine
  [Depends] foomatic-db-gutenprint
  [Depends] foomatic-db-hpijs
  [Depends] foomatic-filters-ppds
  [Depends] foomatic-gui
  [Depends] kde
  [Depends] printconf
  [Depends] wine

$ aptitude -v --show-summary=all-packages why foomatic-db
Packages requiring foomatic-db:
  cupsys-driver-gutenprint D: cups-driver-gutenprint D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
  foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine D: foomatic-db
  kde D: kdeadmin R: system-config-printer-kde D: system-config-printer R: hal-cups-utils D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
  wine D: libwine-print D: cups-bsd R: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
  foomatic-db-engine D: foomatic-db
  foomatic-db-gutenprint D: foomatic-db
  foomatic-db-hpijs D: foomatic-db
  foomatic-gui D: python-foomatic D: foomatic-db-engine D: foomatic-db
  printconf D: foomatic-db

$ aptitude -v --show-summary=all-packages-with-dep-versions why foomatic-db
Packages requiring foomatic-db:
  cupsys-driver-gutenprint D: cups-driver-gutenprint (>= 5.0.2-4) D: cups (>= 1.3.0) R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
  foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
  kde D: kdeadmin (>= 4:3.5.5) R: system-config-printer-kde (>= 4:4.2.2-1) D: system-config-printer (>= 1.0.0) R: hal-cups-utils D: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
  wine D: libwine-print (= 1.1.15-1) D: cups-bsd R: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
  foomatic-db-engine D: foomatic-db
  foomatic-db-gutenprint D: foomatic-db
  foomatic-db-hpijs D: foomatic-db
  foomatic-gui D: python-foomatic (>= 0.7.9.2) D: foomatic-db-engine D: foomatic-db (>= 20090301)
  printconf D: foomatic-db
	    </screen>

	    <para>
	      <literal>--show-summary</literal> used to list a chain on one line:
	    </para>

	    <screen>$ aptitude --show-summary=all-packages why aptitude-gtk libglib2.0-data
Packages requiring libglib2.0-data:
  aptitude-gtk D: libglib2.0-0 R: libglib2.0-data</screen>
	  </example>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-t</literal> <replaceable>release</replaceable>, <literal>--target-release</literal> <replaceable>release</replaceable></term>

	<listitem>
	  <para>
	    Set the release from which packages should be
	    installed.  For instance, <quote><literal>aptitude -t
	    experimental ...</literal></quote> will install
	    packages from the experimental distribution unless you
	    specify otherwise.
	  </para>

	  <para>
	    This will affect the default candidate version of packages
	    according to the rules described in
	    <citerefentry><refentrytitle>apt_preferences</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
	  </para>

	  <para>
	    This corresponds to the configuration item <literal>APT::Default-Release</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-V</literal>, <literal>--show-versions</literal></term>

	<listitem>
	  <para>
	    Show which versions of packages will be installed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Versions'>Aptitude::CmdLine::Show-Versions</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-v</literal>, <literal>--verbose</literal></term>

	<listitem>
	  <para>
	    Causes some commands (for instance, <literal>show</literal>) to display extra information.  This may be supplied multiple times to get more and more information.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Verbose'>Aptitude::CmdLine::Verbose</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--version</literal></term>

	<listitem>
	  <para>
	    Display the version of &aptitude; and some information
	    about how it was compiled.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--visual-preview</literal></term>

	<listitem>
	  <para>
	    When installing or removing packages from the command
	    line, instead of displaying the usual prompt, start up the
	    visual interface and display its preview screen.
	  </para>
	</listitem>
      </varlistentry>


      <varlistentry>
	<term><literal>-W</literal>, <literal>--show-why</literal></term>

	<listitem>
	  <para>
	    In the preview displayed before packages are installed or
	    removed, show which manually installed package requires
	    each automatically installed package.  For instance:
	  </para>

	  <para><screen>$ aptitude --show-why install mediawiki
...
The following NEW packages will be installed:
  libapache2-mod-php5{a} (for mediawiki)  mediawiki  php5{a} (for mediawiki)
  php5-cli{a} (for mediawiki)  php5-common{a} (for mediawiki)
  php5-mysql{a} (for mediawiki)</screen></para>

          <para>
	    When combined with <literal>-v</literal> or a non-zero
	    value for <link
	    linkend='configCmdLine-Verbose'><literal>Aptitude::CmdLine::Verbose</literal></link>,
	    this displays the entire chain of dependencies that lead
	    each package to be installed.  For instance:
	  </para>

	  <para><screen>$ aptitude -v --show-why install libdb4.2-dev
The following NEW packages will be installed:
  libdb4.2{a} (libdb4.2-dev D: libdb4.2)  libdb4.2-dev
The following packages will be REMOVED:
  libdb4.4-dev{a} (libdb4.2-dev C: libdb-dev P&lt;- libdb-dev)</screen></para>

          <para>
	    This option will also describe why packages are being
	    removed, as shown above.  In this example,
	    <systemitem>libdb4.2-dev</systemitem> conflicts with
	    <systemitem>libdb-dev</systemitem>, which is provided by
	    <systemitem>libdb-dev</systemitem>.
	  </para>

	  <para>
	    This argument corresponds to the configuration option
	    <literal><link
	    linkend='configCmdLine-Show-Why'>Aptitude::CmdLine::Show-Why</link></literal>
	    and displays the same information that is computed by
	    <literal>aptitude why</literal> and <literal>aptitude
	    why-not</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-w</literal> <replaceable>width</replaceable>, <literal>--width</literal> <replaceable>width</replaceable></term>

	<listitem>
	  <para>
	    Specify the display width which should be used for output from the
	    <literal>search</literal> and <literal>versions</literal> commands
	    (in the command line).
	  </para>

	  <para>
	    By default and when the output is seen directly in a terminal, the
	    terminal width is used.  When the output is redirected or piped, a
	    very large "unlimited" line width is used, and this option is
	    ignored.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Package-Display-Width'>Aptitude::CmdLine::Package-Display-Width</link></literal>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-y</literal>, <literal>--assume-yes</literal></term>

	<listitem>
	  <para>
	    When a yes/no prompt would be presented, assume that
	    the user entered <quote>yes</quote>.  In particular,
	    suppresses the prompt that appears when installing,
	    upgrading, or removing packages.  Prompts for <quote>dangerous</quote> actions, such as removing
	    essential packages, will still be displayed.  This
	    option overrides <literal>-P</literal>.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Assume-Yes'>Aptitude::CmdLine::Assume-Yes</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-Z</literal></term>

	<listitem>
	  <para>
	    Show how much disk space will be used or freed by the
	    individual packages being installed, upgraded, or
	    removed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Size-Changes'>Aptitude::CmdLine::Show-Size-Changes</link></literal>.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>

    <para>
      The following options apply to the visual mode of the
      program, but are primarily for internal use; you generally
      won't need to use them yourself.
    </para>

    <variablelist>
      <varlistentry>
	<term><literal>--autoclean-on-startup</literal></term>

	<listitem>
	  <para>
	    Deletes old downloaded files when the program starts
	    (equivalent to starting the program and immediately
	    selecting
	    <menuchoice><guimenu>Actions</guimenu><guimenuitem>Clean
	    obsolete files</guimenuitem></menuchoice>).  You cannot
	    use this option and
	    <quote><literal>--clean-on-startup</literal></quote>,
	    <quote><literal>-i</literal></quote>, or
	    <quote><literal>-u</literal></quote> at the same time.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--clean-on-startup</literal></term>

	<listitem>
	  <para>
	    Cleans the package cache when the program starts
	    (equivalent to starting the program and immediately
	    selecting
	    <menuchoice><guimenu>Actions</guimenu><guimenuitem>Clean
	    package cache</guimenuitem></menuchoice>).  You cannot use
	    this option and
	    <quote><literal>--autoclean-on-startup</literal></quote>,
	    <quote><literal>-i</literal></quote>, or
	    <quote><literal>-u</literal></quote> at the same time.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-i</literal></term>

	<listitem>
	  <para>
	    Displays a download preview when the program starts
	    (equivalent to starting the program and immediately
	    pressing <quote><keycap>g</keycap></quote>).  You cannot
	    use this option and
	    <quote><literal>--autoclean-on-startup</literal></quote>,
	    <quote><literal>--clean-on-startup</literal></quote>, or
	    <quote><literal>-u</literal></quote> at the same time.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-S</literal> <replaceable>fname</replaceable></term>

	<listitem>
	  <para>
	    Loads the extended state information from <replaceable>fname</replaceable> instead of the
	    standard state file.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-u</literal></term>

	<listitem>
	  <para>
	    Begins updating the package lists as soon as the program
	    starts.  You cannot use this option and
	    <quote><literal>--autoclean-on-startup</literal></quote>,
	    <quote><literal>--clean-on-startup</literal></quote>, or
	    <quote><literal>-i</literal></quote> at the same time.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Environment</title>

    <variablelist>
    <varlistentry>
      <term><literal>HOME</literal></term>

      <listitem>
	<para>
	  If <filename>$HOME/.aptitude</filename> exists, &aptitude; will store
	  its configuration file in <filename>$HOME/.aptitude/config</filename>.
          Otherwise, it will look up the current user's home directory
          using <citerefentry><refentrytitle>getpwuid</refentrytitle><manvolnum>2</manvolnum></citerefentry>
          and place its configuration file there.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>PAGER</literal></term>

      <listitem>
	<para>
	  If this environment variable is set, &aptitude; will use it
	  to display changelogs when <quote><literal>aptitude
	  changelog</literal></quote> is invoked.  If not set, it
	  defaults to <literal>more</literal>.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>TMP</literal></term>

      <listitem>
	<para>
	  If <literal>TMPDIR</literal> is unset, &aptitude; will store
	  its temporary files in <literal>TMP</literal> if that
	  variable is set.  Otherwise, it will store them in
	  <filename>/tmp</filename>.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>TMPDIR</literal></term>

      <listitem>
	<para>
	  &aptitude; will store its temporary files in the directory
	  indicated by this environment variable.  If
	  <literal>TMPDIR</literal> is not set, then
	  <literal>TMP</literal> will be used; if
	  <literal>TMP</literal> is also unset, then &aptitude; will
	  use <filename>/tmp</filename>.
	</para>
      </listitem>
    </varlistentry>
    </variablelist>
  </refsect1>


  <refsect1>
    <title>Files</title>

    <variablelist>
      <varlistentry>
	<term><filename>/var/lib/aptitude/pkgstates</filename></term>
	<listitem>
	  <para>
	    The file in which stored package states and some package
	    flags are stored.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>

    <variablelist>
      <varlistentry>
	<term>
	  <filename>/etc/apt/apt.conf</filename>,
	  <filename>/etc/apt/apt.conf.d/*</filename>,
	  <filename>~/.aptitude/config</filename>
	</term>
	<listitem>
	  <para>
	    The configuration files for &aptitude;.
	    <filename>~/.aptitude/config</filename> overrides
	    <filename>/etc/apt/apt.conf</filename>.  See
	    <citerefentry><refentrytitle>apt.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
	    for documentation of the format and contents of these
	    files.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>See also</title>

    <para>
      <citerefentry><refentrytitle>apt-get</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <filename>/usr/share/doc/aptitude/html/<replaceable>lang</replaceable>/index.html</filename> from the package aptitude-doc-<replaceable>lang</replaceable>
    </para>
  </refsect1>
</refentry>

<refentry>
  <refentryinfo>
    <!--
	The <author> element isn't needed here, because docbook-xsl
	automatically generates author information from the main
	document's author element.  Languages that provide only a
	manpage should include this information, though.

    <author>
      <personname>
	<firstname>Daniel</firstname>
	<surname>Burrows</surname>
      </personname>
      <email>dburrows@debian.org</email>
    </author>
    -->

    <title>aptitude-create-state-bundle</title>

     <!-- NWalsh's docbook scripts use this to generate the footer: -->
    <productname>aptitude-create-state-bundle</productname>
    <productnumber>&VERSION;</productnumber>

    <legalnotice>
      <para>
	Copyright 2007 Daniel Burrows.
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
	Boston, MA 02110-1301 USA.
      </para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>aptitude-create-state-bundle</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>aptitude-create-state-bundle</refname>
    <refpurpose>bundle the current aptitude state</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>aptitude-create-state-bundle</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <arg choice='plain'><replaceable>output-file</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <note>
      <para>
	This command is mostly for internal use and bug reporting in exceptional
	cases, it is not intended for end-users under normal circumstances.
      </para>
    </note>

    <para>
      <command>aptitude-create-state-bundle</command> produces a
      compressed archive storing the files that are required to
      replicate the current package archive state.  The following
      files and directories are included in the bundle:
    </para>

    <itemizedlist>
      <listitem>
	<para><filename><envar>$HOME</envar>/.aptitude</filename></para>
      </listitem>

      <listitem>
	<para><filename>/var/lib/aptitude</filename></para>
      </listitem>

      <listitem>
	<para><filename>/var/lib/apt</filename></para>
      </listitem>

      <listitem>
	<para><filename>/var/cache/apt/*.bin</filename></para>
      </listitem>

      <listitem>
	<para><filename>/etc/apt</filename></para>
      </listitem>

      <listitem>
	<para><filename>/var/lib/dpkg/status</filename></para>
      </listitem>
    </itemizedlist>

    <para>
      The output of this program can be used as an argument to <link
      linkend='aptitudeRunStateBundle'><citerefentry><refentrytitle>aptitude-run-state-bundle</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>.
    </para>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <variablelist>
      <varlistentry>
	<term><literal>--force-bzip2</literal></term>

	<listitem>
	  <para>
	    Override the autodetection of which compression algorithm
	    to use.  By default,
	    <command>aptitude-create-state-bundle</command> uses
	    <citerefentry><refentrytitle>bzip2</refentrytitle><manvolnum>1</manvolnum></citerefentry>
	    if it is available, and
	    <citerefentry><refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum></citerefentry>
	    otherwise.  Passing this option forces the use of
	    <command>bzip2</command> even if it doesn't appear to be
	    available.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--force-gzip</literal></term>

	<listitem>
	  <para>
	    Override the autodetection of which compression algorithm
	    to use.  By default,
	    <command>aptitude-create-state-bundle</command> uses
	    <citerefentry><refentrytitle>bzip2</refentrytitle><manvolnum>1</manvolnum></citerefentry>
	    if it is available, and
	    <citerefentry><refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum></citerefentry>
	    otherwise.  Passing this option forces the use of
	    <command>gzip</command> even if <command>bzip2</command>
	    is available.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--help</literal></term>

	<listitem>
	  <para>
	    Print a brief usage message, then exit.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--print-inputs</literal></term>

	<listitem>
	  <para>
	    Instead of creating a bundle, display a list of the files
	    and directories that the program would include if it
	    generated a bundle.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>File format</title>

    <para>
      The bundle file is simply a
      <citerefentry><refentrytitle>tar</refentrytitle><manvolnum>1</manvolnum></citerefentry>
      file compressed with
      <citerefentry><refentrytitle>bzip2</refentrytitle><manvolnum>1</manvolnum></citerefentry>
      or
      <citerefentry><refentrytitle>gzip</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
      with each of the input directory trees rooted at
      <quote><filename>.</filename></quote>.
    </para>
  </refsect1>

  <refsect1>
    <title>See also</title>

    <para>
      <citerefentry><refentrytitle>aptitude-run-state-bundle</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>aptitude</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>
    </para>
  </refsect1>
</refentry>

<refentry id='aptitudeRunStateBundle'>
  <refentryinfo>
    <!--
	The <author> element isn't needed here, because docbook-xsl
	automatically generates author information from the main
	document's author element.  Languages that provide only a
	manpage should include this information, though.

    <author>
      <personname>
	<firstname>Daniel</firstname>
	<surname>Burrows</surname>
      </personname>
      <email>dburrows@debian.org</email>
    </author>
    -->

    <title>aptitude-run-state-bundle</title>

     <!-- NWalsh's docbook scripts use this to generate the footer: -->
    <productname>aptitude-run-state-bundle</productname>
    <productnumber>&VERSION;</productnumber>

    <legalnotice>
      <para>
	Copyright 2007 Daniel Burrows.
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	This manual page 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.
      </para>

      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
	Boston, MA 02110-1301 USA.
      </para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>aptitude-run-state-bundle</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>aptitude-run-state-bundle</refname>
    <refpurpose>unpack an aptitude state bundle and invoke aptitude on it</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>aptitude-run-state-bundle</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <arg choice='plain'><replaceable>input-file</replaceable></arg>

      <arg choice='opt'> <replaceable>program</replaceable> <arg choice='opt' rep='repeat'><replaceable>arguments</replaceable></arg></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <note>
      <para>
	This command is mostly for internal use and bug reporting in exceptional
	cases, it is not intended for end-users under normal circumstances.
      </para>
    </note>

    <para>
      <command>aptitude-run-state-bundle</command> unpacks the given
      aptitude state bundle created by
      <citerefentry><refentrytitle>aptitude-create-state-bundle</refentrytitle><manvolnum>1</manvolnum></citerefentry>
      to a temporary directory, invokes
      <replaceable>program</replaceable> on it with the supplied
      <replaceable>arguments</replaceable>, and removes the temporary
      directory afterwards.  If <replaceable>program</replaceable> is
      not supplied, it defaults to
      <citerefentry><refentrytitle>aptitude</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
    </para>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <para>
      The following options may occur on the command-line before the
      input file.  Options following the input file are presumed to be
      arguments to &aptitude;.
    </para>

    <variablelist>
      <varlistentry>
	<term><literal>--append-args</literal></term>

	<listitem>
	  <para>
	    Place the options that give the location of the state
	    bundle at the end of the command line when invoking
	    <replaceable>program</replaceable>, rather than at the
	    beginning (the default is to place options at the
	    beginning).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--help</literal></term>

	<listitem>
	  <para>
	    Display a brief usage summary.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--prepend-args</literal></term>

	<listitem>
	  <para>
	    Place the options that give the location of the state
	    bundle at the beginning of the command line when invoking
	    <replaceable>program</replaceable>, overriding any
	    previous <literal>--append-args</literal> (the default is
	    to place options at the beginning).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--no-clean</literal></term>

	<listitem>
	  <para>
	    Do not remove the unpacked state directory after running
	    <command>aptitude</command>.  You might want to use this
	    if, for instance, you are debugging a problem that appears
	    when &aptitude;'s state file is modified.  When
	    <command>aptitude</command> finishes running, the name of
	    the state directory will be printed so that you can access
	    it in the future.
	  </para>

	  <para>
	    This option is enabled automatically by
	    <literal>--statedir</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--really-clean</literal></term>

	<listitem>
	  <para>
	    Delete the state directory after running
	    <command>aptitude</command>, even if
	    <literal>--no-clean</literal> or
	    <literal>--statedir</literal> was supplied.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--statedir</literal></term>

	<listitem>
	  <para>
	    Instead of treating the input file as a state bundle,
	    treat it as an unpacked state bundle.  For instance, you
	    can use this to access the state directory that was
	    created by a prior run with <literal>--no-clean</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--unpack</literal></term>

	<listitem>
	  <para>
	    Unpack the input file to a temporary directory, but don't
	    actually run <command>aptitude</command>.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>See also</title>

    <para>
      <citerefentry><refentrytitle>aptitude-create-state-bundle</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>aptitude</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>
    </para>
  </refsect1>
</refentry>
