# Dpkg - module with core variables - man - [phpMan]

> **TLDR:** Debian package manager.
>
- Install a package:
  `sudo dpkg {{-i|--install}} {{path/to/file.deb}}`
- Remove a package:
  `sudo dpkg {{-r|--remove}} {{package}}`
- List installed packages:
  `dpkg {{-l|--list}} {{pattern}}`
- List a package's contents:
  `dpkg {{-L|--listfiles}} {{package}}`
- List contents of a local package file:
  `dpkg {{-c|--contents}} {{path/to/file.deb}}`
- Find out which package owns a file:
  `dpkg {{-S|--search}} {{path/to/file}}`
- Purge an installed or already removed package, including configuration:
  `sudo dpkg {{-P|--purge}} {{package}}`

*Source: tldr-pages*

---

[_Dpkg_(3perl)](https://www.chedong.com/phpMan.php/man/Dpkg/3perl/markdown)                                 libdpkg-perl                                 [_Dpkg_(3perl)](https://www.chedong.com/phpMan.php/man/Dpkg/3perl/markdown)

## NAME
       Dpkg - module with core variables

## DESCRIPTION
       The Dpkg module provides a set of variables with information concerning this system
       installation.

       It is also the entry point to the Dpkg module hierarchy.

## VARIABLES
       $[Dpkg::PROGNAME](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APROGNAME/markdown)
           Contains the name of the current program.

       $[Dpkg::PROGVERSION](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APROGVERSION/markdown)
           Contains the version of the dpkg suite.

       $[Dpkg::PROGMAKE](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APROGMAKE/markdown)
           Contains the name of the system GNU make program.

       $[Dpkg::PROGTAR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APROGTAR/markdown)
           Contains the name of the system GNU tar program.

       $[Dpkg::PROGPATCH](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APROGPATCH/markdown)
           Contains  the  name  of  the  system GNU patch program (or another implementation that is
           directory traversal resistant).

       $[Dpkg::CONFDIR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ACONFDIR/markdown)
           Contains the path to the dpkg system configuration directory.

       $[Dpkg::ADMINDIR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AADMINDIR/markdown)
           Contains the path to the dpkg database directory.

       $[Dpkg::LIBDIR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ALIBDIR/markdown)
           Contains the path to the dpkg methods and plugins directory.

       $[Dpkg::DATADIR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADATADIR/markdown)
           Contains the path to the dpkg architecture tables directory.

## MODULES
       The following is the list of public modules within the  Dpkg  hierarchy.  Only  modules  with
       versions  1.00  or  higher,  and  only  the interfaces documented in their POD are considered
       public.

       Dpkg
           This module, core variables.

       [Dpkg::Arch](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AArch/markdown)
           Architecture handling functions.

       [Dpkg::BuildFlags](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ABuildFlags/markdown)
           Set, modify and query compilation build flags.

       [Dpkg::BuildInfo](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ABuildInfo/markdown)
           Build information functions.

       [Dpkg::BuildOptions](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ABuildOptions/markdown)
           Parse and manipulate **DEB_BUILD_OPTIONS**.

       [Dpkg::BuildProfiles](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ABuildProfiles/markdown)
           Parse and manipulate build profiles.

       [Dpkg::Changelog](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChangelog/markdown)
           Parse changelogs.

       [Dpkg::Changelog::Entry](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChangelog%3A%3AEntry/markdown)
           Represents a changelog entry.

       [Dpkg::Changelog::Parse](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChangelog%3A%3AParse/markdown)
           Generic changelog parser for _dpkg-parsechangelog_.

       [Dpkg::Checksums](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AChecksums/markdown)
           Generate and parse checksums.

       [Dpkg::Compression](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ACompression/markdown)
           Simple database of available compression methods.

       [Dpkg::Compression::FileHandle](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ACompression%3A%3AFileHandle/markdown)
           Transparently compress and decompress files.

       [Dpkg::Compression::Process](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ACompression%3A%3AProcess/markdown)
           Wrapper around compression tools.

       [Dpkg::Conf](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AConf/markdown)
           Parse _dpkg_ configuration files.

       [Dpkg::Control](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl/markdown)
           Parse  and  manipulate  Debian  control  information  (_.dsc_,  _.changes_,  _Packages_/_Sources_
           entries, etc.).

       [Dpkg::Control::Changelog](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3AChangelog/markdown)
           Represent fields output by _dpkg-parsechangelog_.

       [Dpkg::Control::Fields](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3AFields/markdown)
           Manage (list of known) control fields.

       [Dpkg::Control::Hash](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3AHash/markdown)
           Parse and manipulate a stanza of deb822 fields.

       [Dpkg::Control::Info](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3AInfo/markdown)
           Parse files like _debian/control_.

       [Dpkg::Control::Tests](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3ATests/markdown)
           Parse files like _debian/tests/control_.

       [Dpkg::Control::Tests::Entry](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3ATests%3A%3AEntry/markdown)
           Represents a _debian/tests/control_ stanza.

       [Dpkg::Deps](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps/markdown)
           Parse and manipulate dependencies.

       [Dpkg::Deps::Simple](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3ASimple/markdown)
           Represents a single dependency statement.

       [Dpkg::Deps::Multiple](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3AMultiple/markdown)
           Base module to represent multiple dependencies.

       [Dpkg::Deps::Union](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3AUnion/markdown)
           List of unrelated dependencies.

       [Dpkg::Deps::AND](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3AAND/markdown)
           List of AND dependencies.

       [Dpkg::Deps::OR](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3AOR/markdown)
           List of OR dependencies.

       [Dpkg::Deps::KnownFacts](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3AKnownFacts/markdown)
           List of installed and virtual packages.

       [Dpkg::Exit](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AExit/markdown)
           Push, pop and run exit handlers.

       [Dpkg::Gettext](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AGettext/markdown)
           Wrapper around [Locale::gettext](https://www.chedong.com/phpMan.php/perldoc/Locale%3A%3Agettext/markdown).

       [Dpkg::IPC](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AIPC/markdown)
           Spawn sub-processes and feed/retrieve data.

       [Dpkg::Index](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AIndex/markdown)
           Collections of [Dpkg::Control](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl/markdown) (_Packages_/_Sources_ files for example).

       [Dpkg::Interface::Storable](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AInterface%3A%3AStorable/markdown)
           Base object serializer.

       [Dpkg::Path](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3APath/markdown)
           Common path handling functions.

       [Dpkg::Source::Format](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ASource%3A%3AFormat/markdown)
           Parse and manipulate debian/source/format files.

       [Dpkg::Source::Package](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ASource%3A%3APackage/markdown)
           Extract Debian source packages.

       [Dpkg::Substvars](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ASubstvars/markdown)
           Substitute variables in strings.

       [Dpkg::Vendor](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AVendor/markdown)
           Identify current distribution vendor.

       [Dpkg::Version](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AVersion/markdown)
           Parse and manipulate Debian package versions.

## CHANGES
### Version 2.00 (dpkg 1.20.0)
       Remove variables: $version, $progname, $admindir, $dpkglibdir and $pkgdatadir.

### Version 1.03 (dpkg 1.18.24)
       New variable: $PROGPATCH.

### Version 1.02 (dpkg 1.18.11)
       New variable: $PROGTAR, $PROGMAKE.

### Version 1.01 (dpkg 1.17.0)
       New variables: $PROGNAME, $PROGVERSION, $CONFDIR, $ADMINDIR, $LIBDIR and $DATADIR.

       Deprecated variables: $version, $admindir, $dpkglibdir and $pkgdatadir.

### Version 1.00 (dpkg 1.15.6)
       Mark the module as public.

## LICENSE
       See the header comment on each module for their particular license.

1.22.6                                       2026-05-06                                  [_Dpkg_(3perl)](https://www.chedong.com/phpMan.php/man/Dpkg/3perl/markdown)
