6.5. The Debian Package Manager

 < Day Day Up > 

Debian GNU/Linux provides several package management tools, primarily intended to facilitate the building, installation, and management of binary packages. In addition to Debian GNU/Linux, the tools described here also work on other Debian-based systems such as Xandros, Knoppix, Ubuntu, and numerous others.

Debian package names generally end in .deb. The Debian package management tools described here include apt, aptitude, dpkg, dpkg-deb, dselect, and synaptic.

Each of these tools is described in detail in the section "Debian Package Manager Command Summary," later in this chapter.

6.5.1. Files

Some important files used by the Debian package management tools are described briefly here:


control

Comes with each package. Documents dependencies; contains the name and version of the package, a description, maintainer, installed size, the package priority, etc.


conffiles

Comes with each package. Contains a list of the configuration files associated with the package.


preinst, postinst, prerm, postrm

Scripts that developers can include in a package to be run before installation, after installation, before removal, or after removal of the package.


/var/lib/dpkg/available

Contains information about packages available on the system.


/var/lib/dpkg/status

Contains information about the status of packages available on the system.


/etc/apt/sources.list

A list for APT of package sources, used to locate packages. The sources are listed one per line, in order of preference.


/etc/apt/apt.conf

The main APT configuration file.


/etc/apt/apt_preferences

A preferences file that controls various aspects of APT, such as letting a user select the version or release of a package to install.


/etc/dpkg/dpkg.cfg

A configuration file containing default options for dpkg.

For a user, the important file is /etc/apt/sources.list. This file is where you set up the paths to the package archives, telling apt where to go to find packages. apt is installed with a default file. You aren't required to modify the sources in the file, but you'll probably want to change some sources, or add additional ones at some point. You might also want to change some of the options in the configuration files apt.conf, apt_preferences, and dpkg.config if you aren't satisfied with the defaults. The control, conffiles, and the pre- and post- install and removal script files are created by the package developers and used internally by the package management system.

6.5.2. Package Priorities

Every Debian package has a priority associated with it, indicating how important the package is to the system. The priorities are:


required

The package is essential to the proper functioning of the system.


important

The package provides important functionality that enables the system to run well.


standard

The package is included in a standard system installation.


optional

The package is one that you might want to install, but you can omit it if you are short on disk space, for example.


extra

The package either conflicts with other packages that have a higher priority, has specialized requirements, or is one that you would want to install only if you need it.

The control file for dpkg, for example, shows that dpkg itself has a priority of required, while dpkg-dev (which provides tools for building Debian packages ) has a priority of standard, and dpkg-doc is optional.

6.5.3. Package and Selection States

The possible states that a package can be in are:


config-files

Only the configuration files for the package are present on the system.


half-configured

The package is unpacked and configuration was started but not completed.


half-installed

Installation was started but not completed.


installed

The package is unpacked and configured.


not-installed

The package is not installed.


unpacked

The package is unpacked but not configured.

The possible package selection states are:


deinstall

The package has been selected for deinstallation (i.e., for removal of everything but the configuration files).


install

The package has been selected for installation.


purge

The package has been selected to be purged (i.e., for removal of everything including the configuration files).

6.5.4. Package Flags

Two possible package flags can be set for a package:


hold

The package shouldn't be handled by dpkg unless forced with the --force-hold option. Holding a package keeps it at the current version, preventing it from being updated. You might hold a package, for example, if the latest version is broken and you want to stay with the version you have until a newer one is released.


reinst-required

The package is broken and needs to be reinstalled. Such a package cannot be removed unless forced with the --force-reinstreq option.

6.5.5. Scripts

In addition to the commands described in the next section, a number of shell and Perl scripts are included with the package manager for use in managing and building packages:


apt-file

Search for packages, specifying an action and a pattern to search for. (Perl script)


apt-rdepends

Recursively list dependencies. (Perl script)


apt-setup

An interactive script for adding download sources to the sources.list file. (Shell script)


dpkg-architecture

Determine and set the build and host architecture for package building. (Perl script)


dpkg-checkbuilddeps

Check installed packages against the build dependencies and build conflicts listed in the control file. (Perl script)


dpkg-buildpackage

A control script to help automate package building. (Shell script)


dpkg-distaddfile

Add an entry for a file to debian/files. (Perl script)


dpkg-divert

Create and manage the list of diversions, used to override the default location for installing files. (Perl script)


dpkg-genchanges

Generate an upload control file from the information in an unpacked built source tree and the files it has generated. (Perl script)


dpkg-gencontrol

Read information from an unpacked source tree, generate a binary package control file (by default, debian/tmp/DEBIAN/control), and add an entry for the binary file to debian/files. (Perl script)


dpkg-name

Rename Debian packages to their full package names. (Shell script)


dpkg-parsechangelog

Read and parse the changelog from an unpacked source tree and write the information to standard output in machine-readable form. (Perl script)


dpkg-preconfigure

Let packages ask questions prior to installation. (Perl script)


dpkg-reconfigure

Reconfigure a package that is already installed. (Perl script)


dpkg-scanpackages

Create a Packages file from a tree of binary packages. The Packages file is used by dselect to provide a list of packages available for installation. (Perl script)


dpkg-shlibdeps

Calculate shared library dependencies for named executables. (Perl script)


dpkg-source

Pack and unpack Debian source archives. (Perl script)


dpkg-statoverride

Manage the list of stat overrides, which let dpkg override file ownership and mode when a package is installed. (Perl script)

6.5.6. Debian Package Manager Command Summary

For the apt- commands, options can be specified on the command line or set in the configuration file. Boolean options set in the configuration file can be overridden on the command line in a number of different ways, such as --no-opt and -opt=no, where opt is the single-character or full name of the option.

Many of these commands accept the following the common options:


-c file, --config-file= file

Specify a configuration file to be read after the default configuration file.


-h, --help

Print usage information and exit.


-o, --option

Set a configuration option. Syntax is -o group::tool=option.


-v, --version

Print version information and exit.

apt-cache

 apt-cache [options] command

Perform low-level operations on the APT binary cache, including the ability to perform searches and produce output reports from package metadata.

Commands


add files

Add the specified package index files to the source cache.


depends pkgs

For each specified package, show a list of dependencies and packages that can fulfill them.


dotty pkgs

Graph the relationships between the specified packages. The default is to trace out all dependent packages; turn this behavior off by setting the APT::Cache::GivenOnly configuration option.


dump

List every package in the cache. Used for debugging.


dumpavail

Print a list of available packages to standard output, suitable for use with dpkg.


gencaches

Build source and package caches from the sources in the file sources.list and from /var/lib/dpkg/status. Equivalent to running apt-get check.


madison [ pkgs]

Display a table showing the available versions of each specified package. Similar to madison, a Debian tool that checks for package versions and reports their status. This option works locally and doesn't require access to the Debian project's internal archive.


pkgnames [ prefix]

Print a list of packages in the system. If prefix is specified, print only packages whose names begin with that prefix. Most useful with the --generate option.


policy [ pkgs]

Print detailed information about the priority selection of each specified package. With no arguments, print the priorities of all sources. Useful for debugging issues related to the preferences file.


rdepends [ pkgs]

Show a list of reverse dependencies for each specified package; i.e., list any packages that depend on the specified packages.


search regex

Search package names and descriptions of all available package files for the specified regular expression and print the name and short description of each matching package. With --full, the output is identical to that from the show command. With --names-only, only the package name is searched. Multiple regular expressions can be specified. Useful for finding packages when you don't know the actual package name.


show pkgs

Display the package records for each specified package. See the -a option for more details.


showpkg pkgs

Display information about the specified packages. For each package, the output includes the available versions, packages that depend on this package, and packages that this package depends on. Useful for debugging.


showsrc pkgs

Display source package records for each specified package.


stats

Display statistics about the cache.


unmet

Display the unmet dependencies in the package cache.

Options

The common options listed earlier are also accepted.


-a, --all-versions

Print full records for all available versions. For use with the show command. The default is to show all versions; turn it off with --no-all-versions to display only the version that would be installed. The configuration option is APT::Cache::AllVersions.


--all-names

Cause pkgnames to print all names, including virtual packages and missing dependencies. The configuration option is APT::Cache::AllNames.


-f, --full

Print full package records when searching. The configuration option is APT::Cache::ShowFull.


-g, --generate

Automatically regenerate the package cache rather than using the current cache. The default is to regenerate; you can turn it off with --no-generate. The configuration option is APT::Cache::Generate.


-i, --important

Print only important dependencies (Depends and Pre-Depends relations). For use with unmet. The configuration option is APT::Cache::Important.


--installed

Only produce output for currently installed packages. For use with depends and rdepends. The configuration option is APT::Cache::Installed.


-n, --names-only

Search only on package names, not long descriptions. The configuration option is APT::Cache::NamesOnly.


-p file, --pkg-cache= file

Use the specified file for the package cache, which is the primary cache used by all operations. The configuration option is Dir::Cache::pkgcache.


-q, --quiet

Operate quietly, producing output for logging but no progress indicators. Use -qq for even quieter operation. The configuration option is quiet.


--recurse

Run depends or rdepends recursively, so that all specified packages are printed once. The configuration option is APT::Cache::RecurseDepends.


-s file, --src-cache= file

Specify the source cache file used by gencaches. The configuration option is Dir::Cache::srcpkgcache.

apt-cdrom

 apt-cdrom [options] command

Add a new CD-ROM to APT's list of available sources. The database of CD-ROM IDs that APT maintains is /var/lib/apt/cdroms.list.

Commands


add

Add a CD-ROM to the source list.


ident

Print the identity of the current CD-ROM and the stored filename. Used for debugging.

Options

The common options listed earlier are also accepted.


-a, --thorough

Do a thorough package scan. May be needed with some old Debian CD-ROMs.


-d mount-point, --cdrom= mount-point

Specify the CD-ROM mount point, which must be listed in /etc/fstab. The configuration option is Acquire::cdrom::mount.


-f, --fast

Do a fast copy, assuming the files are valid and don't all need checking. Specify this only if the disk has been run before without error. The configuration option is APT::CDROM::Fast.


-m, --no-mount

Don't mount or unmount the mount point. The configuration option is APT::CDROM::NoMount.


-n, --just-print, --recon, --no-act

Check everything, but don't actually make any changes. The configuration option is APT::CDROM::NoAct.


-r, --rename

Prompt for a new label and rename the disk to the new value. The configuration option is APT::CDROM::Rename.

apt-config

 apt-config [options] shell args apt-config [options] dump

An internal program for querying configuration information.

Commands


dump

Display the contents of the configuration space.


shell

Access the configuration information from a shell script. The arguments are in pairs, specifying the name of a shell variable and a configuration value to query. The value may be postfixed with /x, where x is one of the following letters:


b

Return true or false.


d

Return directories.


f

Return filenames.


i

Return an integer.

Options

The common options listed earlier are accepted.

apt-extracttemplates

 apt-extracttemplates [options] files

Extract configuration scripts and templates from the specified Debian package files. For each specified file, a line of output is generated with the following information:

 package version template-file config-script

and the template files and configuration scripts are written to the directory specified with -t or --temp-dir or by the configuration option APT::ExtractTemplates::TempDir. The filenames are in the form package.template.xxxx and package.config.xxxx.

Options

The common options listed earlier are also accepted.


-t dir, --tempdir= dir

Write the extracted template files and configuration scripts to the specified directory. The configuration option is APT::ExtractTemplates::TempDir.

apt-ftparchive

 apt-ftparchive [options] command

Generate package and other index files used to access a distribution source. The files should be generated on the source's origin site.

Commands


clean config-file

Clean the databases used by the specified configuration file by removing obsolete records.


contents path

Search the specified directory tree recursively. For each .deb file found, read the file list, sort the files by package, and write the results to standard output. Use with --db to specify a binary caching database.


generate config-file sections

Build indexes according to the specified configuration file.


packages path [ override [ pathprefix]]

Generate a package file from the specified directory tree. The optional override file contains information describing how the package fits into the distribution, and the optional path prefix is a string prepended to the filename fields. Similar to dpkg-scanpackages. Use with --db to specify a binary caching database.


release path

Generate a release file from the specified directory tree.


sources paths [ override [ pathprefix]]

Generate a source index file from the specified directory tree. The optional override file contains information used to set priorities in the index file and to modify maintainer information. The optional path prefix is a string prepended to the directory field in the generated source index. Use --source-override to specify a different source override file. Similar to dpkg-scansources.

Options

The common options listed earlier are also accepted.


--contents

Perform contents generation. If set, and package indexes are being generated with a cache database, the file listing is extracted and stored in the database. If used with generate, allows the creation of any contents files. The default is on. The configuration option is APT::FTPArchive::Contents.


-d, --db

Use a binary caching database. This option has no effect on generate. The configuration option is APT::FTPArchive::DB.


--delink

Enable delinking of files when used with the External-Links setting. The default is on; turn off with --no-delink. The configuration option is APT::FTPArchive::DeLinkAct.


--md5

Generate MD5 checksums for the index files. The default is on. The configuration option is APT::FTPArchive::MD5.


-q, --quiet

Run quietly, producing logging information but no progress indicators. Use -qq for quieter operation. The configuration option is quiet.


--read-only

Make the caching databases read-only. The configuration option is APT::FTPArchive::ReadOnlyDB.


-s file, --source-override= file

Specify a source override file. For use with the sources command. See sources description for more information. The configuration option is APT::FTPArchive::SourceOverride.

apt-get

 apt-get [options] command [package ...]

A command-line tool for handling packages. Also serves as a backend to other APT tools such as dselect, synaptic, and aptitude (all described later in this section). As described earlier in this chapter, the following command can be run every day to keep your system updated:

 apt-get update && apt-get -u dist-upgrade

Commands


autoclean

Like clean, but remove only package files that can no longer be downloaded. Set the configuration option APT::Clean-Installed to off to prevent installed packages from being erased.


build-dep

Install or remove packages to satisfy the build dependencies for a source package.


clean

Clear the local repository of retrieved package files. Useful for freeing up disk space.


check

Update the package cache and check for broken packages.


dist-upgrade

Like upgrade, but also handle dependencies intelligently. See the -f option for more information.


dselect-upgrade

Used with dselect. TRack the changes made by dselect to the Status field of available packages and take actions necessary to realize that status.


install packages

Install one or more packages. Specify the package name, not the full filename. Other required packages are also retrieved and installed. With a hyphen appended to the package name, the package is removed if it is already installed. Select a version to install by appending an equals sign and the version.


remove packages

Remove one or more packages. Specify the package name, not the full filename. With a plus sign appended to the name, the package is installed.


source packages

Find source packages and download them into the current directory. If specified with --compile, the source packages are compiled into binary packages. With --download-only, the source packages are not unpacked. Select a specific version by appending an equals sign and the version.


update

Resynchronize the package overview files from their sources. Must be done before an upgrade or dist-upgrade.


upgrade

Install the latest versions of all packages currently installed. Remember to run update first.

Options

The common options listed earlier are also accepted.


--arch-only

Process only architecture-dependent build dependencies. Configuration option is APT::Get::Arch-Only.


-b, --build, --compile

Compile source packages after download. The configuration option is APT::Get::Compile.


-d, --download-only

Retrieve package files, but don't unpack or install them. The configuration option is APT::Get::Download-only.


--diff-only

Download only the diff file from a source archive. The configuration option is APT::Get::Diff-Only.


-f, --fix-broken

Try to fix a system with broken dependencies. Can be used alone or with a command. Run with the install command if you have problems installing packages. You can run the sequence:

apt-get -f install apt-get dist-upgrade

several times to clean up interlocking dependency problems. The configuration option is APT::Get::Fix-Broken.


--force-yes

Force yes. Causes APT to continue without prompting if it is doing something that could damage your system. Use with great caution and only if absolutely necessary. The configuration option is APT::Get::force-yes.


--ignore-hold

Ignore a hold placed on a package, which normally prevents the package from being upgraded. Use with dist-upgrade to override many undesired holds. The configuration option is APT::Get::Ignore-Hold.


--list-cleanup

Erase obsolete files from /var/lib/apt/lists. The default is on; use --no-list-cleanup to turn it off, which you would normally do only if you frequently modify your list of sources. The configuration option is APT::Get::List-Cleanup.


-m, --ignore-missing, --fix-missing

Ignore missing or corrupted packages or packages that cannot be retrieved. Can cause problems when used with -f. The configuration option is APT::Get::Fix-Missing.


--no-download

Disable package downloading; use with --ignore-missing to force APT to use only the packages that have already been downloaded. The configuration option is APT::Get::Download.


--no-remove

Do not remove any packages; instead, abort without prompting. The configuration option is APT::Get::Remove.


--no-upgrade

Do not upgrade packages. Use with install to prevent upgrade of packages that are already installed. The configuration option is APT::Get::Upgrade.


--only-source

Do not map the names specified with the source or build-dep commands through the binary table. With this option, only source package names can be specified. The configuration option is APT::Get::Only-Source.


--print-uris

Print Uniform Resource Indicators (URIs) of files instead of fetching them. Print path, destination filename, size, and expected MD5 checksum. The configuration option is APT::Get::Print-URIs.


--purge

Tell dpkg to do a purge instead of a remove for items that would be removed. Purging removes packages completely, including any configuration files. The configuration option is APT::Get::Purge.


-q, --quiet

Quiet mode. Omit progress indicators and produce only logging output. Use -qq to make even quieter. The configuration option is quiet.


--reinstall

Reinstall packages that are already installed, upgrading them to the latest version. The configuration option is APT::Get::ReInstall.


-s, --simulate, --just-print, --dry-run, --recon, --no-act

Go through the motions, but don't actually make any changes to the system. The configuration option is APT::Get::Simulate.


-t rel, --target-release= rel, --default-release= rel

Retrieve packages only from the specified release. The value of rel can be a release number or a value such as unstable. The configuration option is APT::Default-Release.


--tar-only

Download only the tar file from a source archive. The configuration option is APT::Get::Tar-Only.


--trivial-only

Perform only operations that are considered trivial; i.e., ones that won't harm your system, by, say, removing needed files. Unlike --assume-yes, which always answers "yes" to any prompts, --trivial-only always answers "no." The configuration option is APT::Get::Trivial-Only.


-u, --show-upgraded

Print a list of all packages to be upgraded. The configuration option is APT::Get::Show-Upgraded.


-V, --verbose-versions

Show full versions for upgraded and installed packages. The configuration option is APT::Get::Show-Versions.


-y, --yes, --assume-yes

Automatically reply "yes" to prompts and run noninteractively. Abort if there is an error. The configuration option is APT::Get::Assume-Yes.

apt-sortpkgs

 apt-sortpkgs [options] indexfiles

Sort the records in a source or package index file by package name and write the results to standard output. apt-sortpkgs also sorts the internal fields of each record.

Options

The common options listed earlier are also accepted.


-s, --source

Order by source index field. The configuration option is APT::SortPkgs::Source.

aptitude

 aptitude [options] [action [arguments]]

A text-based frontend to apt, which can be run either directly from the command line or from a visual mode that runs in a terminal window.

Actions

The following actions are supported. Running aptitude with no action invokes the visual mode. Package names can be entered individually or as search patterns. A search pattern consists of terms starting with a tilde (~), followed by a character indicating the type of term, followed by the text to be searched for. The most common usage is to use ~n to search for a package name (e.g., ~nemacs, to search for packages that have emacs in their name). You can find the full list of term types in the Aptitude User's Manual. The manual can be found in /usr/share/doc/README on a Debian system. On an RPM-based system with aptitude installed, the README file may be in /usr/share/aptitude or /usr/share/doc/aptitude.


autoclean

Clean out the cache by removing only packages that can no longer be downloaded.


clean

Clean out the cache by removing all previously downloaded .deb files.


dist-upgrade

Upgrade as many installed packages as possible, installing and removing packages as needed to satisfy dependencies.


download packages

Download the .deb file for each specified package to the current directory.


forbid-version package[= version] ...

Don't allow aptitude to upgrade the package to a particular version. If no version is specified, it is assumed to be the version that would normally be used.


forget-new

Remove internal information about what packages are "new."


help

Display help information and exit.


hold packages

Place a hold on each specified package.


install [ package[= version] ...]

Install the specified packages. With a version, install that version. With no arguments, install any stored or pending actions. You can also use install to perform different actions on multiple packages with a single command. Append - to the package name to remove, + to install, _ to purge, or = to hold a package.


markauto packages

Mark the specified packages as automatically installed.


purge [ package[= version] ...]

Remove the specified packages and their configuration files.


remove [ package[= version] ...]

Remove the specified packages.


search patterns

Search for packages matching each of the specified patterns and display a list of matches. The full list of search terms can be found in the Aptitude User's Manual.


show patterns

Search for packages matching each of the specified patterns and display detailed information for every match it finds.


unhold packages

Remove the hold on each specified package.


unmarkauto packages

Mark the specified packages as manually installed.


update

Update the list of available packages by downloading the names of new and upgradeable packages.


upgrade

Upgrade as many packages as possible; if a package has dependency problems, avoid upgrading that package (but don't remove it).

Options

Most of the aptitude options have corresponding configuration options that can be set in the configuration file.


-d, --download-only

Download packages to the cache but do not install them. Configuration option is Aptitude::CmdLine::Download-Only.


-D, --show-deps

Show summaries of why packages will be automatically installed or removed. Aptitude::CmdLine::Show-Deps is the configuration option.


-f

Attempt to fix dependencies of broken packages. Configuration option is Aptitude::CmdLine::Fix-Broken.


-F format, --display-format format

Specify the output format for search. See the Aptitude User's Manual for details on specifying the format. Configuration option is Aptitude::CmdLine::Package-Display-Format.


-h, --help

Print help message and exit.


-O order, --sort order

Specify the sort order for search output. See the Aptitude User's Manual for details.


-P, --prompt

Always display a prompt, even for actions that were explicitly requested. Configuration option is Aptitude::CmdLine::Always-Prompt.


-r, --with-recommends

Treat recommendations as dependencies when installing new packages. Aptitude::CmdLine::Recommends-Important is the configuration option.


-R, --without-recommends

Do not treat recommendations as dependencies when installing new packages. The configuration option is Aptitude::CmdLine::Recommends-Important.


-s, --simulate

Go through the motions, but do not actually perform the actions. Print the actions that would be performed. The configuration option is Aptitude::CmdLine::Simulate.


-t release, --target-release release

Specify the release to use for installing packages. The configuration option is Aptitude::CmdLine::Default-Release.


-v, --verbose

Operate verbosely, displaying additional information. Specify multiple times to get even more information displayed. Configuration option is Aptitude::CmdLine::Verbose.


-V, --show-versions

Display the version for packages being installed. The configuration option is Aptitude::CmdLine::Show-Versions.


--version

Display the version information for aptitude and exit.


--visual-preview

Start the visual interface and display the preview screen.


-w width, --width width

Specify the output display width for search. The default is the terminal width. Aptitude::CmdLine::Package-Display-Width is the configuration option.


-y, --assume-yes

Assume a "yes" response to a yes/no prompt and don't display the prompt. Prompts for dangerous actions are still shown. This option overrides -P. The configuration option is Aptitude::CmdLine::Assume-Yes.


-Z

Display the disk space that will be used or freed by the packages being acted upon. The configuration option is Aptitude::CmdLine::Show-Size-Changes.

Internal options

The following options are used internally for aptitude's visual mode. You shouldn't need to issue them directly.


-i

Display a download preview when the program starts. Cannot be used with -u.


-S filename

Load extended state information from the specified file, not the default state file.


-u

Begin updating the package lists as soon as the program starts. Cannot be used with -i.

dpkg

 dpkg [options] action

A tool for installing, managing, and building packages. Also serves as a frontend to dpkg-deb and dpkg-query.

dpkg actions

These actions are carried out by dpkg itself:


-A pkgfile, --record-avail pkgfile

Update the record of available files kept in /var/lib/dpkg/available with information from pkgfile. This information is used by dpkg and dselect to determine what packages are available. With -R or --recursive, pkgfile must be a directory.


-C, --audit

Search for partially installed packages and suggest how to get them working.


--clear-avail

Remove existing information about what packages are available.


--command-fd n

Accept commands passed on the file descriptor given by n. Note that any additional options set through this file descriptor or on the command line are not reset, but remain for other commands issued during the same session.


--compare-versions ver1 op ver2

Perform a binary comparison of two version numbers. The operators lt, le, eq, ne, ge, and gt treat a missing version as earlier. The operators lt-nl, le-nl, ge-nl, and gt-nl treat a missing version as later (where nl is "not later"). A third set of operators (< << <= = >= >> >) is provided for compatibility with control-file syntax. dpkg returns zero for success (i.e., the condition is satisfied) and nonzero otherwise.


--configure [packages|-a|--pending]

Reconfigure one or more unpacked packages. If -a or --pending is given instead of packages, configure all packages that are unpacked but not configured. Configuring a package involves unpacking the configuration files, backing up the old configuration files, and running the postinst script if one is present.


-Dh, --debug=help

Print debugging help message and exit.


--force-help

Print help message about the --force-list options and exit. See the --force-list option description later in this entry for the possible values of list.


--forget-old-unavail

Forget about uninstalled, unavailable packages.


--get-selections [pattern]

Get list of package selections and write to standard output. With pattern specified, write selections that match the pattern.


--help

Print help message and exit.


-i pkgfile, --install pkgfile

Install the package specified as pkgfile. With -R or --recursive, pkgfile must be a directory.


--license, --licence

Print dpkg license information and exit.


--merge-avail pkgs-file

Update the record of available files kept in /var/lib/dpkg/available. This information is used by dpkg and dselect to determine what packages are available. Merging combines the information from pkgs-file (distributed as Packages) with the existing information.


--print-architecture

Print the target architecture.


--print-gnu-build-architecture

Print the GNU version of the target architecture.


--print-installation-architecture

Print the host architecture for installation.


--purge [packages|-a|--pending]


-r, --remove [packages|-a|--pending]

Purge or remove one or more installed packages. Removal gets rid of everything except the configuration files listed in debian/conffiles; purging also removes the configuration files. If -a or --pending is given instead of packages, dpkg removes or purges all packages that are unpacked and marked (in /var/lib/dpkg/status) for removing or purging.


--set-selections

Set package selections based on input file read from standard input.


--unpack pkgfile

Unpack the package, but do not configure it. With -R or --recursive, pkgfile must be a directory.


--update-avail pkgs-file

Like --merge-avail, but replaces the information with the contents of the pkgs-file.


--version

Print dpkg version information and exit.


--yet-to-unpack

Search for uninstalled packages that have been selected for installation.

dpkg-deb actions

The following actions can be specified for dpkg and are passed to dpkg-deb for execution. Also see dpkg-deb.


-b dir [archive], --build dir [archive]

Build a package.


-c archive, --contents archive

List the contents of a package.


-e archive [dir], --control archive [dir]

Extract control information from a package.


-f archive [control-fields], --field archive [control-fields]

Display the control field or fields of a package.


-I archive [control-files], --info archive [control-files]

Show information about a package.


--fsys-tarfile archive

Write the filesystem tree contained in archive to standard output in tar format.


-x archive dir, --extract archive dir

Extract the files from a package.


-X archive dir, --vextract archive dir

Extract the files and display the filenames from a package.

dpkg-query actions

The following actions can be specified for dpkg and are passed to dpkg-query for execution. Also see dpkg-query.


-l, --list [pkg-name-pattern]

List all packages whose names match the specified pattern. With no pattern, list all packages in /var/lib/dpkg/available. The pattern can include standard shell wildcard characters and may have to be quoted to prevent the shell from doing filename expansion.


-L packages, --listfiles packages

List installed files that came from the specified package or packages.


-p, --print-avail package

Print the details about package from /var/lib/dpkg/available.


-s packages, --status packages

Report the status of one or more packages by displaying the entry in the status database /var/lib/dpkg/status.


-S filename-pattern, --search filename-pattern

Search installed packages for a filename. The pattern can include standard shell wildcard characters and may have to be quoted to prevent the shell from doing filename expansion.

Options

dpkg options can be specified on the command line or set in the configuration file. Each line in the configuration file contains a single option, specified without the leading dash (-).


--abort-after= num

Abort processing after num errors. Default is 50.


--admindir= adir, --instdir= idir, --root= rdir

Change default directories. adir contains administrative files with status and other information about packages; it defaults to /var/lib/dpkg. idir is the directory into which packages are installed; it defaults to /. Changing the root directory to rdir automatically changes idir to rdir and adir to /rdir/var/lib/dpkg.


-B, --auto-deconfigure

When a package is removed, automatically deconfigure any other package that depended on it.


-Doctal, --debug= octal

Turn on debugging, with the octal value specifying the desired level of debugging information. Use -Dh or --debug=help to display the possible values. You can OR the values to get the desired output.


-E, --skip-same-version

Don't install the package if this version is already installed.


--force-list, --no-force-list, --refuse-list

Force or refuse to force an operation. list is specified as a comma-separated list of options. With --force, a warning is printed, but processing continues. --refuse and --no-force cause processing to stop with an error. Use --force-help to display a message describing the options. The force/refuse options are:


all

Turn all force options on or off.


architecture

Process even if intended for a different architecture.


auto-select

Select or deselect packages to install or remove them. Forced by default.


bad-path

Some programs are missing from the path.


bad-verify

Install package even if it fails to verify.


confdef

Always choose the default action for modified configuration files. If there is no default and confnew or confold is also specified, use that to decide; otherwise, ask the user.


configure-any

Configure any unconfigured package that the package depends on.


conflicts

Permit installation of conflicting packages. Can result in problems from files being overwritten.


confmiss

Always install a missing configuration file. Be careful using this option, since it means overriding the removal of the file.


confnew

Always install the new version of a modified configuration file unless confdef is also specified. In that case, use the default action if there is one.


confold

Keep the old version of a modified configuration file unless confdef is also specified. In that case, use the default action if there is one.


depends

Turn dependency problems into warnings.


depends-version

Warn of version problems when checking dependencies, but otherwise ignore.


downgrade

Install even if a newer version is already installed. Forced by default.


hold

Process packages even if they are marked to be held.


not-root

Try to install or remove even when not logged on as root.


overwrite

Overwrite a file from one package with the same file from another package.


overwrite-dir

Overwrite one package's directory with a file from another package.


overwrite-diverted

Overwrite a diverted file with an undiverted version.


remove-essential

Remove a package even if it is essential. Note that this can cause your system to stop working.


remove-reinstreq

Remove a package even if it is broken and is marked to require reinstallation.


-G

Don't install a package if a newer version is already installed. Same as --refuse-downgrade.


--ignore-depends= pkglist

Dependency problems result only in a warning for the packages in pkglist.


--new

New binary package format. This is a dpkg-deb option.


--no-act, --dry-run, --simulate

Go through the motions, but don't actually write any changes. Used for testing. Be sure to specify before the action; otherwise, changes might be written.


--nocheck

Ignore the contents of the control file when building a package. This is a dpkg-deb option.


-O, --selected-only

Process only packages that are marked as selected for installation.


--old

Old binary package format. This is a dpkg-deb option.


-R, --recursive

Recursively handle .deb files found in the directories and their subdirectories specified with -A, -i, --install, --unpack, and --avail.


--status-fd n

Send the package status information to the specified file descriptor. Can be given more than once.

dpkg-deb

 dpkg-deb action [options]

Backend command for building and managing Debian package archives. Also see dpkg; you'll often want to use dpkg to pass commands through to dpkg-deb, rather than call dpkg-deb directly.

Actions


-b dir [ archive] , --build dir [ archive]

Create an archive from the filesystem tree starting with directory dir. The directory must have a DEBIAN subdirectory containing the control file and any other control information. If archive is specified and is a filename, the package is written to that file; if no archive is specified, the package is written to dir.deb. If the archive already exists, it is replaced. If archive is the name of a directory, dpkg-deb looks in the control file for the information it needs to generate the package name. (Note that for this reason, you cannot use --nocheck with a directory name.)


-c archive, --contents archive

List the filesystem-tree portion of archive.


-e archive [ dir] , --control archive [ dir]

Extract control information from archive into the directory dir, which is created if it doesn't exist. If dir is omitted, a DEBIAN subdirectory in the current directory is used.


-f archive [ control-fields] , --field archive [ control-fields]

Extract information about one or more fields in the control file for archive. If no fields are provided, print the entire control file.


-h, --help

Print help information and exit.


-I archive [ control-files] , --info archive [ control-files]

Write information about binary package archive to standard output. If no control files are provided, print a summary of the package contents; otherwise, print the control files in the order they were specified. An error message is printed to standard error for any missing components.


--fsys-tarfile archive

Extract the filesystem tree from archive, and send it to standard output in tar format. Can be used with tar to extract individual files from an archive.


--license, --licence

Print the license information and exit.


--version

Print the version number and exit.


-W archive, --showarchive archive

Show information about the specified archive. The output can be customized with the --showformat option.


-x archive dir, --extract archive dir-X archive dir, --vextract archive dir

Extract the filesystem tree from archive into the specified directory, creating dir if it doesn't already exist. -x (--extract) works silently, while -X (--vextract) lists the files as it extracts them. Do not use this action to install packages; use dpkg instead.

Options


-D, --debug

Turn on debugging.


--new

Build a new-style archive format (this is the default).


--nocheck

Don't check the control file before building an archive. This lets you build a broken archive.


--old

Build an old-style archive format.


--showformat= format

Specify the output format for -W/--show. The format can include the standard escape sequences \n (newline), \r (carriage return), or \\ (backslash). Specify package fields with the syntax ${var[;width]}. Fields are right-aligned by default, or left-aligned if width is negative.


-z#

Set the compression level to the value specified by #.


-Z type

Set the type of compression to use when building an archive. Possible values are: gzip, bzip2, and none.

dpkg-query

 dpkg-query [option] command

Display information about packages listed in the dpkg database. You can also use dpkg-query as a backend for dpkg, instead of calling dpkg-query directly.

Commands


--help

Print help information and exit.


-l [patterns], --list [patterns]

List packages whose names match any of the specified patterns. With no pattern specified, list all packages in /var/lib/dpkg/available. The pattern may need to be in quotes to avoid expansion by the shell.


-L packages, --listfiles packages

List files installed on your system from each of the specified packages. This command does not list files created by package-specific installation scripts.


--license, --licence

Print the license information and exit.


-p package, --print-avail package

Display details for the specified package, as found in /var/lib/dpkg/available.


-s package, --status package

Report on the status of the specified package.


-S patterns, --search patterns

Search the installed packages for filenames matching one of the specified patterns. At least one pattern must be specified.


-W [ patterns] , --show [ patterns]

Similar to -l; however, the output can be customized with the --showformat option.


--version

Print version information and exit.

Options


--admindir= dir

Use dir as the location of the dpkg database. The default is /var/lib/dpkg.


--showformat= format

Specify the output format for -W/--show. The format can include the standard escape sequences \n (newline), \r (carriage return), or \\ (backslash). Specify package fields with the syntax ${var[;width]}. Fields are right-aligned by default, or left-aligned if width is negative.

dpkg-split

 dpkg-split [action] [options]

Split a binary package into smaller pieces and reassemble the pieces, either manually or in automatic mode. The automatic mode maintains a queue of parts for reassembling. Useful for transferring to and from floppy disks on older systems.

Actions


-a -o output part, --auto -o output part

Add part to the queue for automatic reassembly, and if all the parts are available, reassemble the package as output. Requires the use of the -o (or --output) option, as shown.


-d [packages], --discard [packages]

Discard parts from the automatic-assembly queue. If any packages are specified, discard only parts from those packages. Otherwise, empty the queue.


-I parts, --info parts

Print information about the part file or files specified to standard output.


-j parts, --join parts

Join the parts of a package file together from the parts specified. The default output file is package-version.deb.


-l, --listq

List the contents of the queue of parts waiting for reassembly, giving the package name, the parts that are on the queue, and the number of bytes.


-s full-package [prefix], --split full-package [prefix]

Split the package full-package into parts, named prefixNofM.deb. The prefix defaults to the full-package name without the .deb extension.


-h, --help

Print help message and exit.


--license, --licence

Print license information and exit.


--version

Print version information and exit.

Options


--depotdir dir

Specify an alternate directory dir for the queue of parts waiting for reassembly. Default is /var/lib/dpkg.


--msdos

Force --split output filenames to be MS-DOS-compatible.


-o output, --output output

Use output as the filename for a reassembled package.


-Q, --npquiet

Do not print an error message for a part that doesn't belong to a binary package when doing automatic queuing or reassembly.


-S num, --partsize num

When splitting, specify the maximum part size (num) in kilobytes. Default is 450 KB.

dselect

 dselect [options] [action]

A screen-oriented user frontend to dpkg. One of the primary user interfaces for installing and managing packages. See dpkg and dpkg-deb for information on building packages.

Actions

If dselect is run with no action specified on the command line, it displays the following menu:

  * 0. [A]ccess   Choose the access method to use.    1. [U]pdate   Update list of available packages, if                  possible.    2. [S]elect   Request which packages you want on your                  system.    3. [I]nstall  Install and upgrade wanted packages.    4. [C]onfig   Configure any packages that are                  unconfigured.    5. [R]emove   Remove unwanted software.    6. [Q]uit     Quit dselect.

The asterisk (on the first line) shows the currently selected option. Any of the menu items can be specified directly on the command line as an action (access, update, select, install, config, remove, quit) to go directly to the desired activity. For example:

 dselect access

If you enter quit on the command line, dselect exits immediately without doing anything. An additional command-line action is menu, which displays the menu and is equivalent to running dselect with no action.

Options

Options can be specified both on the command line and in the dselect configuration file, /etc/dpkg/dselect.cfg.


--admindir dir

Change the directory that holds internal data files to dir. Default is /var/lib/dpkg.


--color colorspec, --colour colorspec

Set colors for different parts of the screen, as specified by colorspec as follows:

screenpart:[fgcolor],[bgcolor][:attr[+attr+ ...]]

This option can be specified multiple times, to override the default colors for different screen parts. Rather than having to specify the colors on the command line each time you run dselect, you might prefer to set them in the configuration file. The possible screen parts (going from the top of the screen to the bottom) are:


title

The screen title.


listhead

The header line above the package list.


list

The scrolling list of packages and some help text.


listsel

The selected item in the list.


pkgstate

The text showing the current state of each package.


pkgstatesel

The text showing the current state of the selected package.


infohead

The header line showing the state of the selected package.


infodesc

The short description of the package.


info

The text that displays information such as the package description.


infofoot

The last line of the screen when selecting packages.


query

Query lines.


helpscreen

The color of help screens.

Either the foreground color, the background color, or both can be specified for each screen part. The colors are given as the standard curses colors. After the color specification, you can specify a list of attributes separated by plus signs (+). The possible attributes are normal, standout, underline, reverse, blink, bright, dim, and bold. Not all attributes work on all terminals.


--expert

Run in expert mode; don't print help messages.


-D [ file] , --debug [ file]

Turn on debugging. Send output to file if specified.


--help

Print help message and exit.


--license, licence

Print license information and exit.


--version

Print version information and exit.

synaptic

 synaptic [options]

Graphical frontend for APT. Use in place of apt-get to install, upgrade, or remove packages from your system. With synaptic, you can view a list of all available packages, or you can break the list down in various ways to make it more manageable. From the synaptic window, you can select from a list of categories. The categories are section (e.g., view only development-related packages), package status, alphabetic (e.g., view only packages whose name starts with the letter A), search history, or filter.

If you choose to display by filter, there are a set of predefined filters, or you can define your own. The predefined filters include ones to display all packages, packages marked for a status change, packages that can be configured with debconf (Debian systems only), packages with broken dependencies, and packages that can be upgraded to a later version. You can edit the existing filters or define your own, by selecting Preferences Filters from the Edit menu.

To start synaptic from Gnome, select System tools Synaptic Package Manager from the Application menu. From the KDE menu, select Settings Extra Synaptic Package Manager. You can also start the graphical interface from the command line, with the command:

 synaptic [options]

Options

In addition to the following options, synaptic accepts the standard GTK+ toolkit command-line options.


-f filename, --filter-file= filename

Use the specified file as an alternative filter settings file.


-h, --help

Print help message and exit.


-i num, --initial-filter= num

Start up with the filter numbered num as the initial filter.


--non-interactive

Run without prompting for user input.


-o option, --option=option

Set an internal option. Don't use this option unless you are sure you know what you are doing.


-r

Open with the file repository window displayed. This window lists the repositories and shows which are active.

     < Day Day Up > 


    Unix in a Nutshell
    Unix in a Nutshell, Fourth Edition
    ISBN: 0596100299
    EAN: 2147483647
    Year: 2005
    Pages: 201

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net