O'Reilly logo

LPI Linux Certification in a Nutshell, 3rd Edition by James Stanger, Bruno Gomes Pessanha, Stephen Addison Schneiter, Adam Haeder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

dpkg

Syntax

dpkg [options] action

Description

The Debian package manager command, dpkg, consists of an action that specifies a major mode of operation as well as zero or more options, which modify the action’s behavior.

The dpkg command maintains package information in /var/lib/dpkg. There are two files that are of particular interest:

available

The list of all available packages.

status

Contains package attributes, such as whether it is installed or marked for removal.

These files are modified by dpkg, dselect, and apt-get, and it is unlikely that they will ever need to be edited.

Frequently used options

-E

Do not overwrite a previously installed package of the same version.

-G

Do not overwrite a previously installed package with an older version of that same package.

-R (also --recursive)

Recursively process package files in specified subdirectories. Works with -i, --install, --unpack, and so on.

Frequently used options

--configure package

Configure an unpacked package. This involves setup of configuration files.

-i package_file (also --install package_file)

Install the package contained in package_file. This involves backing up old files, unpacking and installation of new files, and configuration.

-l [pattern] (also --list [pattern])

Display information for installed package names that match pattern.

-L package (also --listfiles package)

List files installed from package.

--print-avail package

Display details found in /var/lib/dpkg/available about package.

--purge package

Remove everything for package ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required