{
    "mode": "info",
    "parameter": "dpkg",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/dpkg/json",
    "generated": "2026-07-07T06:14:18Z",
    "synopsis": "dpkg [option...] action",
    "sections": {
        "NAME": {
            "content": "Dpkg - module with core variables\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dpkg [option...] action\n",
            "subsections": []
        },
        "WARNING": {
            "content": "This manual is intended for users wishing to understand dpkg's command\nline options and package states in more detail than that provided by\ndpkg --help.\n\nIt should not be used by package maintainers wishing to understand how\ndpkg will install their packages. The descriptions of what dpkg does\nwhen installing and removing packages are particularly inadequate.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Dpkg module provides a set of variables with information concerning\nthis system installation.\n\nIt is also the entry point to the Dpkg module hierarchy.\n",
            "subsections": []
        },
        "INFORMATION ABOUT PACKAGES": {
            "content": "dpkg maintains some usable information about available packages. The\ninformation is divided in three classes: states, selection states and\nflags. These values are intended to be changed mainly with dselect.\n\nPackage states\nnot-installed\nThe package is not installed on your system.\n\nconfig-files\nOnly the configuration files or the postrm script and the data it\nneeds to remove of the package exist on the system.\n\nhalf-installed\nThe installation of the package has been started, but not completed\nfor some reason.\n\nunpacked\nThe package is unpacked, but not configured.\n\nhalf-configured\nThe package is unpacked and configuration has been started, but not\nyet completed for some reason.\n\ntriggers-awaited\nThe package awaits trigger processing by another package.\n\ntriggers-pending\nThe package has been triggered.\n\ninstalled\nThe package is correctly unpacked and configured.\n\nPackage selection states\ninstall\nThe package is selected for installation.\n\nhold\nA package marked to be on hold is kept on the same version, that\nis, no automatic new installs, upgrades or removals will be\nperformed on them, unless these actions are requested explicitly,\nor are permitted to be done automatically with the --force-hold\noption.\n\ndeinstall\nThe package is selected for deinstallation (i.e. we want to remove\nall files, except configuration files).\n\npurge\nThe package is selected to be purged (i.e. we want to remove\neverything from system directories, even configuration files).\n\nunknown\nThe package selection is unknown.  A package that is also in a not-\ninstalled state, and with an ok flag will be forgotten in the next\ndatabase store.\n\nPackage flags\nok  A package marked ok is in a known state, but might need further\nprocessing.\n\nreinstreq\nA package marked reinstreq is broken and requires reinstallation.\nThese packages cannot be removed, unless forced with option\n--force-remove-reinstreq.\n",
            "subsections": []
        },
        "ACTIONS": {
            "content": "-i, --install package-file...\nInstall the package. If --recursive or -R option is specified,\npackage-file must refer to a directory instead.\n\nInstallation consists of the following steps:\n\n1. Extract the control files of the new package.\n\n2. If another version of the same package was installed before the\nnew installation, execute prerm script of the old package.\n\n3. Run preinst script, if provided by the package.\n\n4. Unpack the new files, and at the same time back up the old\nfiles, so that if something goes wrong, they can be restored.\n\n5. If another version of the same package was installed before the\nnew installation, execute the postrm script of the old package.\nNote that this script is executed after the preinst script of the\nnew package, because new files are written at the same time old\nfiles are removed.\n\n6. Configure the package. See --configure for detailed information\nabout how this is done.\n\n--unpack package-file...\nUnpack the package, but don't configure it. If --recursive or -R\noption is specified, package-file must refer to a directory\ninstead.\n\n--configure package...|-a|--pending\nConfigure a package which has been unpacked but not yet configured.\nIf -a or --pending is given instead of package, all unpacked but\nunconfigured packages are configured.\n\nTo reconfigure a package which has already been configured, try the\ndpkg-reconfigure(8) command instead.\n\nConfiguring consists of the following steps:\n\n1. Unpack the conffiles, and at the same time back up the old\nconffiles, so that they can be restored if something goes wrong.\n\n2. Run postinst script, if provided by the package.\n\n--triggers-only package...|-a|--pending\nProcesses only triggers (since dpkg 1.14.17).  All pending triggers\nwill be processed.  If package names are supplied only those\npackages' triggers will be processed, exactly once each where\nnecessary. Use of this option may leave packages in the improper\ntriggers-awaited and triggers-pending states. This can be fixed\nlater by running: dpkg --configure --pending.\n\n-r, --remove package...|-a|--pending\nRemove an installed package.  This removes everything except\nconffiles and other data cleaned up by the postrm script, which may\navoid having to reconfigure the package if it is reinstalled later\n(conffiles are configuration files that are listed in the\nDEBIAN/conffiles control file).  If there is no DEBIAN/conffiles\ncontrol file nor DEBIAN/postrm script, this command is equivalent\nto calling --purge.  If -a or --pending is given instead of a\npackage name, then all packages unpacked, but marked to be removed\nin file /var/lib/dpkg/status, are removed.\n\nRemoving of a package consists of the following steps:\n\n1. Run prerm script\n\n2. Remove the installed files\n\n3. Run postrm script\n\n-P, --purge package...|-a|--pending\nPurge an installed or already removed package. This removes\neverything, including conffiles, and anything else cleaned up from\npostrm.  If -a or --pending is given instead of a package name,\nthen all packages unpacked or removed, but marked to be purged in\nfile /var/lib/dpkg/status, are purged.\n\nNote: Some configuration files might be unknown to dpkg because\nthey are created and handled separately through the configuration\nscripts. In that case, dpkg won't remove them by itself, but the\npackage's postrm script (which is called by dpkg), has to take care\nof their removal during purge. Of course, this only applies to\nfiles in system directories, not configuration files written to\nindividual users' home directories.\n\nPurging of a package consists of the following steps:\n\n1. Remove the package, if not already removed. See --remove for\ndetailed information about how this is done.\n\n2. Run postrm script.\n",
            "subsections": [
                {
                    "name": "-V, --verify [package-name...]",
                    "content": "Verifies the integrity of package-name or all packages if omitted,\nby comparing information from the files installed by a package with\nthe files metadata information stored in the dpkg database (since\ndpkg 1.17.2).  The origin of the files metadata information in the\ndatabase is the binary packages themselves. That metadata gets\ncollected at package unpack time during the installation process.\n\nCurrently the only functional check performed is an md5sum\nverification of the file contents against the stored value in the\nfiles database.  It will only get checked if the database contains\nthe file md5sum. To check for any missing metadata in the database,\nthe --audit command can be used.\n\nThe output format is selectable with the --verify-format option,\nwhich by default uses the rpm format, but that might change in the\nfuture, and as such, programs parsing this command output should be\nexplicit about the format they expect.\n",
                    "flag": "-V",
                    "long": "--verify",
                    "arg": "[package-name...]"
                },
                {
                    "name": "-C, --audit [package-name...]",
                    "content": "Performs database sanity and consistency checks for package-name or\nall packages if omitted (per package checks since dpkg 1.17.10).\nFor example, searches for packages that have been installed only\npartially on your system or that have missing, wrong or obsolete\ncontrol data or files. dpkg will suggest what to do with them to\nget them fixed.\n",
                    "flag": "-C",
                    "long": "--audit",
                    "arg": "[package-name...]"
                },
                {
                    "name": "--update-avail [Packages-file]",
                    "content": "",
                    "long": "--update-avail",
                    "arg": "[Packages-file]"
                },
                {
                    "name": "--merge-avail [Packages-file]",
                    "content": "Update dpkg's and dselect's idea of which packages are available.\nWith action --merge-avail, old information is combined with\ninformation from Packages-file. With action --update-avail, old\ninformation is replaced with the information in the Packages-file.\nThe Packages-file distributed with Debian is simply named\n<<Packages>>. If the Packages-file argument is missing or named\n<<->> then it will be read from standard input (since dpkg 1.17.7).\ndpkg keeps its record of available packages in\n/var/lib/dpkg/available.\n\nA simpler one-shot command to retrieve and update the available\nfile is dselect update. Note that this file is mostly useless if\nyou don't use dselect but an APT-based frontend: APT has its own\nsystem to keep track of available packages.\n\n-A, --record-avail package-file...\nUpdate dpkg and dselect's idea of which packages are available with\ninformation from the package package-file. If --recursive or -R\noption is specified, package-file must refer to a directory\ninstead.\n",
                    "long": "--merge-avail",
                    "arg": "[Packages-file]"
                },
                {
                    "name": "--forget-old-unavail",
                    "content": "Now obsolete and a no-op as dpkg will automatically forget\nuninstalled unavailable packages (since dpkg 1.15.4), but only\nthose that do not contain user information such as package\nselections.\n",
                    "long": "--forget-old-unavail"
                },
                {
                    "name": "--clear-avail",
                    "content": "Erase the existing information about what packages are available.\n",
                    "long": "--clear-avail"
                },
                {
                    "name": "--get-selections [package-name-pattern...]",
                    "content": "Get list of package selections, and write it to stdout. Without a\npattern, non-installed packages (i.e. those which have been\npreviously purged) will not be shown.\n",
                    "long": "--get-selections",
                    "arg": "[package-name-pattern...]"
                },
                {
                    "name": "--set-selections",
                    "content": "Set package selections using file read from stdin. This file should\nbe in the format \"package state\", where state is one of install,\nhold, deinstall or purge. Blank lines and comment lines beginning\nwith '#' are also permitted.\n\nThe available file needs to be up-to-date for this command to be\nuseful, otherwise unknown packages will be ignored with a warning.\nSee the --update-avail and --merge-avail commands for more\ninformation.\n",
                    "long": "--set-selections"
                },
                {
                    "name": "--clear-selections",
                    "content": "Set the requested state of every non-essential package to deinstall\n(since dpkg 1.13.18).  This is intended to be used immediately\nbefore --set-selections, to deinstall any packages not in list\ngiven to --set-selections.\n",
                    "long": "--clear-selections"
                },
                {
                    "name": "--yet-to-unpack",
                    "content": "Searches for packages selected for installation, but which for some\nreason still haven't been installed.\n\nNote: This command makes use of both the available file and the\npackage selections.\n",
                    "long": "--yet-to-unpack"
                },
                {
                    "name": "--predep-package",
                    "content": "Print a single package which is the target of one or more relevant\npre-dependencies and has itself no unsatisfied pre-dependencies.\n\nIf such a package is present, output it as a Packages file entry,\nwhich can be massaged as appropriate.\n\nNote: This command makes use of both the available file and the\npackage selections.\n\nReturns 0 when a package is printed, 1 when no suitable package is\navailable and 2 on error.\n\n--add-architecture architecture\nAdd architecture to the list of architectures for which packages\ncan be installed without using --force-architecture (since dpkg\n1.16.2).  The architecture dpkg is built for (i.e. the output of\n--print-architecture) is always part of that list.\n\n--remove-architecture architecture\nRemove architecture from the list of architectures for which\npackages can be installed without using --force-architecture (since\ndpkg 1.16.2). If the architecture is currently in use in the\ndatabase then the operation will be refused, except if\n--force-architecture is specified. The architecture dpkg is built\nfor (i.e. the output of --print-architecture) can never be removed\nfrom that list.\n",
                    "long": "--predep-package"
                },
                {
                    "name": "--print-architecture",
                    "content": "Print architecture of packages dpkg installs (for example, \"i386\").\n",
                    "long": "--print-architecture"
                },
                {
                    "name": "--print-foreign-architectures",
                    "content": "Print a newline-separated list of the extra architectures dpkg is\nconfigured to allow packages to be installed for (since dpkg\n1.16.2).\n",
                    "long": "--print-foreign-architectures"
                },
                {
                    "name": "--assert-help",
                    "content": "Give help about the --assert-feature options (since dpkg 1.21.0).\n",
                    "long": "--assert-help"
                },
                {
                    "name": "--assert-feature",
                    "content": "Asserts that dpkg supports the requested feature.  Returns 0 if the\nfeature is fully supported, 1 if the feature is known but dpkg\ncannot provide support for it yet, and 2 if the feature is unknown.\nThe current list of assertable features is:\n\nsupport-predepends\nSupports the Pre-Depends field (since dpkg 1.1.0).\n\nworking-epoch\nSupports epochs in version strings (since dpkg 1.4.0.7).\n\nlong-filenames\nSupports long filenames in deb(5) archives (since dpkg\n1.4.1.17).\n\nmulti-conrep\nSupports multiple Conflicts and Replaces (since dpkg 1.4.1.19).\n\nmulti-arch\nSupports multi-arch fields and semantics (since dpkg 1.16.2).\n\nversioned-provides\nSupports versioned Provides (since dpkg 1.17.11).\n\nprotected-field\nSupports the Protected field (since dpkg 1.20.1).\n\n--validate-thing string\nValidate that the thing string has a correct syntax (since dpkg\n1.18.16).  Returns 0 if the string is valid, 1 if the string is\ninvalid but might be accepted in lax contexts, and 2 if the string\nis invalid.  The current list of validatable things is:\n\npkgname\nValidates the given package name (since dpkg 1.18.16).\n\ntrigname\nValidates the given trigger name (since dpkg 1.18.16).\n\narchname\nValidates the given architecture name (since dpkg 1.18.16).\n\nversion\nValidates the given version (since dpkg 1.18.16).\n\n--compare-versions ver1 op ver2\nCompare version numbers, where op is a binary operator. dpkg\nreturns true (0) if the specified condition is satisfied, and false\n(1) otherwise. There are two groups of operators, which differ in\nhow they treat an empty ver1 or ver2. These treat an empty version\nas earlier than any version: lt le eq ne ge gt. These treat an\nempty version as later than any version: lt-nl le-nl ge-nl gt-nl.\nThese are provided only for compatibility with control file syntax:\n< << <= = >= >> >. The < and > operators are obsolete and should\nnot be used, due to confusing semantics. To illustrate: 0.1 < 0.1\nevaluates to true.\n\n-?, --help\nDisplay a brief help message.\n",
                    "long": "--assert-feature"
                },
                {
                    "name": "--force-help",
                    "content": "Give help about the --force-thing options.\n\n-Dh, --debug=help\nGive help about debugging options.\n",
                    "long": "--force-help"
                },
                {
                    "name": "--version",
                    "content": "Display dpkg version information.\n\nWhen used with --robot, the output will be the program version\nnumber in a dotted numerical format, with no newline.\n\ndpkg-deb actions\nSee dpkg-deb(1) for more information about the following actions,\nand other actions and options not exposed by the dpkg front-end.\n\n-b, --build directory [archive|directory]\nBuild a deb package.\n\n-c, --contents archive\nList contents of a deb package.\n\n-e, --control archive [directory]\nExtract control-information from a package.\n\n-x, --extract archive directory\nExtract the files contained by package.\n\n-X, --vextract archive directory\nExtract and display the filenames contained by a package.\n\n-f, --field  archive [control-field...]\nDisplay control field(s) of a package.\n\n--ctrl-tarfile archive\nOutput the control tar-file contained in a Debian package.\n\n--fsys-tarfile archive\nOutput the filesystem tar-file contained by a Debian package.\n\n-I, --info archive [control-file...]\nShow information about a package.\n\ndpkg-query actions\nSee dpkg-query(1) for more information about the following actions,\nand other actions and options not exposed by the dpkg front-end.\n\n-l, --list package-name-pattern...\nList packages matching given pattern.\n\n-s, --status package-name...\nReport status of specified package.\n\n-L, --listfiles package-name...\nList files installed to your system from package-name.\n\n-S, --search filename-search-pattern...\nSearch for a filename from installed packages.\n\n-p, --print-avail package-name...\nDisplay details about package-name, as found in\n/var/lib/dpkg/available. Users of APT-based frontends should\nuse apt show package-name instead.\n",
                    "long": "--version"
                }
            ]
        },
        "OPTIONS": {
            "content": "All options can be specified both on the command line and in the dpkg\nconfiguration file /etc/dpkg/dpkg.cfg or fragment files (with names\nmatching this shell pattern '[0-9a-zA-Z-]*') on the configuration\ndirectory /etc/dpkg/dpkg.cfg.d/. Each line in the configuration file is\neither an option (exactly the same as the command line option but\nwithout leading hyphens) or a comment (if it starts with a '#').\n\n--abort-after=number\nChange after how many errors dpkg will abort. The default is 50.\n",
            "subsections": [
                {
                    "name": "-B, --auto-deconfigure",
                    "content": "When a package is removed, there is a possibility that another\ninstalled package depended on the removed package. Specifying this\noption will cause automatic deconfiguration of the package which\ndepended on the removed package.\n\n-Doctal, --debug=octal\nSwitch debugging on. octal is formed by bitwise-ORing desired\nvalues together from the list below (note that these values may\nchange in future releases). -Dh or --debug=help display these\ndebugging values.\n\nNumber   Description\n1   Generally helpful progress information\n2   Invocation and status of maintainer scripts\n10   Output for each file processed\n100   Lots of output for each file processed\n20   Output for each configuration file\n200   Lots of output for each configuration file\n40   Dependencies and conflicts\n400   Lots of dependencies/conflicts output\n10000   Trigger activation and processing\n20000   Lots of output regarding triggers\n40000   Silly amounts of output regarding triggers\n1000   Lots of drivel about e.g. the dpkg/info dir\n2000   Insane amounts of drivel\n",
                    "flag": "-B",
                    "long": "--auto-deconfigure"
                },
                {
                    "name": "--force-things",
                    "content": "",
                    "long": "--force-things"
                },
                {
                    "name": "--no-force-things, --refuse-things",
                    "content": "Force or refuse (no-force and refuse mean the same thing) to do\nsome things. things is a comma separated list of things specified\nbelow. --force-help displays a message describing them.  Things\nmarked with (*) are forced by default.\n\nWarning: These options are mostly intended to be used by experts\nonly. Using them without fully understanding their effects may\nbreak your whole system.\n\nall: Turns on (or off) all force options.\n\ndowngrade(*): Install a package, even if newer version of it is\nalready installed.\n\nWarning: At present dpkg does not do any dependency checking on\ndowngrades and therefore will not warn you if the downgrade breaks\nthe dependency of some other package. This can have serious side\neffects, downgrading essential system components can even make your\nwhole system unusable. Use with care.\n\nconfigure-any: Configure also any unpacked but unconfigured\npackages on which the current package depends.\n\nhold: Allow automatic installs, upgrades or removals of packages\neven when marked to be on \"hold\".  Note: This does not prevent\nthese actions when requested explicitly.\n\nremove-reinstreq: Remove a package, even if it's broken and marked\nto require reinstallation. This may, for example, cause parts of\nthe package to remain on the system, which will then be forgotten\nby dpkg.\n\nremove-protected: Remove, even if the package is considered\nprotected (since dpkg 1.20.1).  Protected packages contain mostly\nimportant system boot infrastructure.  Removing them might cause\nthe whole system to be unable to boot, so use with caution.\n\nremove-essential: Remove, even if the package is considered\nessential. Essential packages contain mostly very basic Unix\ncommands. Removing them might cause the whole system to stop\nworking, so use with caution.\n\ndepends: Turn all dependency problems into warnings.  This affects\nthe Pre-Depends and Depends fields.\n\ndepends-version: Don't care about versions when checking\ndependencies.  This affects the Pre-Depends and Depends fields.\n\nbreaks: Install, even if this would break another package (since\ndpkg 1.14.6).  This affects the Breaks field.\n\nconflicts: Install, even if it conflicts with another package. This\nis dangerous, for it will usually cause overwriting of some files.\nThis affects the Conflicts field.\n\nconfmiss: Always install the missing conffile without prompting.\nThis is dangerous, since it means not preserving a change\n(removing) made to the file.\n\nconfnew: If a conffile has been modified and the version in the\npackage did change, always install the new version without\nprompting, unless the --force-confdef is also specified, in which\ncase the default action is preferred.\n\nconfold: If a conffile has been modified and the version in the\npackage did change, always keep the old version without prompting,\nunless the --force-confdef is also specified, in which case the\ndefault action is preferred.\n\nconfdef: If a conffile has been modified and the version in the\npackage did change, always choose the default action without\nprompting. If there is no default action it will stop to ask the\nuser unless --force-confnew or --force-confold is also been given,\nin which case it will use that to decide the final action.\n\nconfask: If a conffile has been modified always offer to replace it\nwith the version in the package, even if the version in the package\ndid not change (since dpkg 1.15.8).  If any of --force-confnew,\n--force-confold, or --force-confdef is also given, it will be used\nto decide the final action.\n\noverwrite: Overwrite one package's file with another's file.\n\noverwrite-dir: Overwrite one package's directory with another's\nfile.\n\noverwrite-diverted: Overwrite a diverted file with an undiverted\nversion.\n\nstatoverride-add: Overwrite an existing stat override when adding\nit (since dpkg 1.19.5).\n\nstatoverride-remove: Ignore a missing stat override when removing\nit (since dpkg 1.19.5).\n\nsecurity-mac(*): Use platform-specific Mandatory Access Controls\n(MAC) based security when installing files into the filesystem\n(since dpkg 1.19.5).  On Linux systems the implementation uses\nSELinux.\n\nunsafe-io: Do not perform safe I/O operations when unpacking (since\ndpkg 1.15.8.6).  Currently this implies not performing file system\nsyncs before file renames, which is known to cause substantial\nperformance degradation on some file systems, unfortunately the\nones that require the safe I/O on the first place due to their\nunreliable behaviour causing zero-length files on abrupt system\ncrashes.\n\nNote: For ext4, the main offender, consider using instead the mount\noption nodelalloc, which will fix both the performance degradation\nand the data safety issues, the latter by making the file system\nnot produce zero-length files on abrupt system crashes with any\nsoftware not doing syncs before atomic renames.\n\nWarning: Using this option might improve performance at the cost of\nlosing data, use with care.\n\nscript-chrootless: Run maintainer scripts without chroot(2)ing into\ninstdir even if the package does not support this mode of operation\n(since dpkg 1.18.5).\n\nWarning: This can destroy your host system, use with extreme care.\n\narchitecture: Process even packages with wrong or no architecture.\n\nbad-version: Process even packages with wrong versions (since dpkg\n1.16.1).\n\nbad-path: PATH is missing important programs, so problems are\nlikely.\n\nnot-root: Try to (de)install things even when not root.\n\nbad-verify: Install a package even if it fails authenticity check.\n\n--ignore-depends=package,...\nIgnore dependency-checking for specified packages (actually,\nchecking is performed, but only warnings about conflicts are given,\nnothing else).  This affects the Pre-Depends, Depends and Breaks\nfields.\n",
                    "long": "--refuse-things"
                },
                {
                    "name": "--no-act, --dry-run, --simulate",
                    "content": "Do everything which is supposed to be done, but don't write any\nchanges. This is used to see what would happen with the specified\naction, without actually modifying anything.\n\nBe sure to give --no-act before the action-parameter, or you might\nend up with undesirable results. (e.g. dpkg --purge foo --no-act\nwill first purge package \"foo\" and then try to purge package\n\"--no-act\", even though you probably expected it to actually do\nnothing).\n",
                    "long": "--simulate"
                },
                {
                    "name": "-R, --recursive",
                    "content": "Recursively handle all regular files matching pattern *.deb found\nat specified directories and all of its subdirectories. This can be\nused with -i, -A, --install, --unpack and --record-avail actions.\n\n-G  Don't install a package if a newer version of the same package is\nalready installed. This is an alias of --refuse-downgrade.\n\n--admindir=dir\nSet the administrative directory to directory.  This directory\ncontains many files that give information about status of installed\nor uninstalled packages, etc.  Defaults to <</var/lib/dpkg>>.\n\n--instdir=dir\nSet the installation directory, which refers to the directory where\npackages are to be installed. instdir is also the directory passed\nto chroot(2) before running package's installation scripts, which\nmeans that the scripts see instdir as a root directory.  Defaults\nto <</>>.\n\n--root=dir\nSet the root directory to directory, which sets the installation\ndirectory to <<dir>> and the administrative directory to\n<<dir/var/lib/dpkg>>.\n",
                    "flag": "-R",
                    "long": "--recursive"
                },
                {
                    "name": "-O, --selected-only",
                    "content": "Only process the packages that are selected for installation. The\nactual marking is done with dselect or by dpkg, when it handles\npackages. For example, when a package is removed, it will be marked\nselected for deinstallation.\n",
                    "flag": "-O",
                    "long": "--selected-only"
                },
                {
                    "name": "-E, --skip-same-version",
                    "content": "Don't install the package if the same version of the package is\nalready installed.\n\n--pre-invoke=command\n--post-invoke=command\nSet an invoke hook command to be run via \"sh -c\" before or after\nthe dpkg run for the unpack, configure, install, triggers-only,\nremove, purge, add-architecture and remove-architecture dpkg\nactions (since dpkg 1.15.4; add-architecture and remove-\narchitecture actions since dpkg 1.17.19). This option can be\nspecified multiple times. The order the options are specified is\npreserved, with the ones from the configuration files taking\nprecedence.  The environment variable DPKGHOOKACTION is set for\nthe hooks to the current dpkg action.\n\nNote: Front-ends might call dpkg several times per invocation,\nwhich might run the hooks more times than expected.\n\n--path-exclude=glob-pattern\n--path-include=glob-pattern\nSet glob-pattern as a path filter, either by excluding or re-\nincluding previously excluded paths matching the specified patterns\nduring install (since dpkg 1.15.8).\n\nWarning: Take into account that depending on the excluded paths you\nmight completely break your system, use with caution.\n\nThe glob patterns use the same wildcards used in the shell, were\n'*' matches any sequence of characters, including the empty string\nand also '/'.  For example, <</usr/*/READ*>> matches\n<</usr/share/doc/package/README>>.  As usual, '?' matches any\nsingle character (again, including '/').  And '[' starts a\ncharacter class, which can contain a list of characters, ranges and\ncomplementations. See glob(7) for detailed information about\nglobbing.  Note: The current implementation might re-include more\ndirectories and symlinks than needed, in particular when there is a\nmore specific re-inclusion, to be on the safe side and avoid\npossible unpack failures; future work might fix this.\n\nThis can be used to remove all paths except some particular ones; a\ntypical case is:\n\n--path-exclude=/usr/share/doc/*\n--path-include=/usr/share/doc/*/copyright\n\nto remove all documentation files except the copyright files.\n\nThese two options can be specified multiple times, and interleaved\nwith each other. Both are processed in the given order, with the\nlast rule that matches a file name making the decision.\n\nThe filters are applied when unpacking the binary packages, and as\nsuch only have knowledge of the type of object currently being\nfiltered (e.g. a normal file or a directory) and have not\nvisibility of what objects will come next.  Because these filters\nhave side effects (in contrast to find(1) filters), excluding an\nexact pathname that happens to be a directory object like\n/usr/share/doc will not have the desired result, and only that\npathname will be excluded (which could be automatically reincluded\nif the code sees the need).  Any subsequent files contained within\nthat directory will fail to unpack.\n\nHint: make sure the globs are not expanded by your shell.\n\n--verify-format format-name\nSets the output format for the --verify command (since dpkg\n1.17.2).\n\nThe only currently supported output format is rpm, which consists\nof a line for every path that failed any check.  These lines have\nthe following format:\n\nmissing   [c] pathname [(error-message)]\n??5?????? [c] pathname\n\nThe first 9 characters are used to report the checks result, either\na literal missing when the file is not present or its metadata\ncannot be fetched, or one of the following special characters that\nreport the result for each check:\n\n'?' Implies the check could not be done (lack of support, file\npermissions, etc).\n\n'.' Implies the check passed.\n\n'A-Za-z0-9'\nImplies a specific check failed.  The following positions and\nalphanumeric characters are currently supported:\n\n1 '?'\nThese checks are currently not supported, will always be\n'?'.\n\n2 'M'\nThe file mode check failed (since dpkg 1.21.0).  Because\npathname metadata is currently not tracked, this check can\nonly be partially emulated via a very simple heuristic for\npathnames that have a known digest, which implies they\nshould be regular files, where the check will fail if the\npathname is not a regular file on the filesystem.  This\ncheck will currently never succeed as it does not have\nenough information available.\n\n3 '5'\nThe digest check failed, which means the file contents have\nchanged.\n\n4-9 '?'\nThese checks are currently not supported, will always be\n'?'.\n\nThe line is followed by a space and an attribute character.  The\nfollowing attribute character is supported:\n\n'c' The pathname is a conffile.\n\nFinally followed by another space and the pathname.\n\nIn case the entry was of the missing type, and the file was not\nactually present on the filesystem, then the line is followed by a\nspace and the error message enclosed within parenthesis.\n\n--status-fd n\nSend machine-readable package status and progress information to\nfile descriptor n. This option can be specified multiple times. The\ninformation is generally one record per line, in one of the\nfollowing forms:\n\nstatus: package: status\nPackage status changed; status is as in the status file.\n\nstatus: package : error : extended-error-message\nAn error occurred. Any possible newlines in extended-error-\nmessage will be converted to spaces before output.\n\nstatus: file : conffile-prompt : 'real-old' 'real-new' useredited\ndistedited\nUser is being asked a conffile question.\n\nprocessing: stage: package\nSent just before a processing stage starts. stage is one of\nupgrade, install (both sent before unpacking), configure,\ntrigproc, disappear, remove, purge.\n\n--status-logger=command\nSend machine-readable package status and progress information to\nthe shell command's standard input, to be run via \"sh -c\" (since\ndpkg 1.16.0).  This option can be specified multiple times.  The\noutput format used is the same as in --status-fd.\n\n--log=filename\nLog status change updates and actions to filename, instead of the\ndefault /var/log/dpkg.log. If this option is given multiple times,\nthe last filename is used. Log messages are of the form:\n\nYYYY-MM-DD HH:MM:SS startup type command\nFor each dpkg invocation where type is archives (with a command\nof unpack or install) or packages (with a command of configure,\ntriggers-only, remove or purge).\n\nYYYY-MM-DD HH:MM:SS status state pkg installed-version\nFor status change updates.\n\nYYYY-MM-DD HH:MM:SS action pkg installed-version available-version\nFor actions where action is one of install, upgrade, configure,\ntrigproc, disappear, remove or purge.\n\nYYYY-MM-DD HH:MM:SS conffile filename decision\nFor conffile changes where decision is either install or keep.\n",
                    "flag": "-E",
                    "long": "--skip-same-version"
                },
                {
                    "name": "--robot",
                    "content": "Use a machine-readable output format. This provides an interface\nfor programs that need to parse the output of some of the commands\nthat do not otherwise emit a machine-readable output format. No\nlocalization will be used, and the output will be modified to make\nit easier to parse.\n\nThe only currently supported command is --version.\n",
                    "long": "--robot"
                },
                {
                    "name": "--no-pager",
                    "content": "Disables the use of any pager when showing information (since dpkg\n1.19.2).\n",
                    "long": "--no-pager"
                },
                {
                    "name": "--no-debsig",
                    "content": "Do not try to verify package signatures.\n",
                    "long": "--no-debsig"
                },
                {
                    "name": "--no-triggers",
                    "content": "Do not run any triggers in this run (since dpkg 1.14.17), but\nactivations will still be recorded.  If used with --configure\npackage or --triggers-only package then the named package postinst\nwill still be run even if only a triggers run is needed. Use of\nthis option may leave packages in the improper triggers-awaited and\ntriggers-pending states. This can be fixed later by running: dpkg\n--configure --pending.\n",
                    "long": "--no-triggers"
                },
                {
                    "name": "--triggers",
                    "content": "Cancels a previous --no-triggers (since dpkg 1.14.17).\n",
                    "long": "--triggers"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "0   The requested action was successfully performed.  Or a check or\nassertion command returned true.\n\n1   A check or assertion command returned false.\n\n2   Fatal or unrecoverable error due to invalid command-line usage, or\ninteractions with the system, such as accesses to the database,\nmemory allocations, etc.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "External environment\nPATH\nThis variable is expected to be defined in the environment and\npoint to the system paths where several required programs are to be\nfound. If it's not set or the programs are not found, dpkg will\nabort.\n\nHOME\nIf set, dpkg will use it as the directory from which to read the\nuser specific configuration file.\n\nTMPDIR\nIf set, dpkg will use it as the directory in which to create\ntemporary files and directories.\n\nSHELL\nThe program dpkg will execute when starting a new interactive\nshell, or when spawning a command via a shell.\n\nPAGER\nDPKGPAGER\nThe program dpkg will execute when running a pager, which will be\nexecuted with <<$SHELL -c>>, for example when displaying the\nconffile differences.  If SHELL is not set, <<sh>> will be used\ninstead.  The DPKGPAGER overrides the PAGER environment variable\n(since dpkg 1.19.2).\n\nDPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted\nvalues are: auto (default), always and never.\n\nDPKGFORCE\nSets the force flags (since dpkg 1.19.5).  When this variable is\npresent, no built-in force defaults will be applied.  If the\nvariable is present but empty, all force flags will be disabled.\n\nDPKGADMINDIR\nIf set and the --admindir or --root options have not been\nspecified, it will be used as the dpkg administrative directory\n(since dpkg 1.20.0).\n\nDPKGFRONTENDLOCKED\nSet by a package manager frontend to notify dpkg that it should not\nacquire the frontend lock (since dpkg 1.19.1).\n\nInternal environment\nLESS\nDefined by dpkg to \"-FRSXMQ\", if not already set, when spawning a\npager (since dpkg 1.19.2).  To change the default behavior, this\nvariable can be preset to some other value including an empty\nstring, or the PAGER or DPKGPAGER variables can be set to disable\nspecific options with <<-+>>, for example DPKGPAGER=\"less -+F\".\n\nDPKGROOT\nDefined by dpkg on the maintainer script environment to indicate\nwhich installation to act on (since dpkg 1.18.5).  The value is\nintended to be prepended to any path maintainer scripts operate on.\nDuring normal operation, this variable is empty.  When installing\npackages into a different instdir, dpkg normally invokes maintainer\nscripts using chroot(2) and leaves this variable empty, but if\n--force-script-chrootless is specified then the chroot(2) call is\nskipped and instdir is non-empty.\n\nDPKGADMINDIR\nDefined by dpkg on the maintainer script environment to indicate\nthe dpkg administrative directory to use (since dpkg 1.16.0).  This\nvariable is always set to the current --admindir value.\n\nDPKGFORCE\nDefined by dpkg on the subprocesses environment to all the\ncurrently enabled force option names separated by commas (since\ndpkg 1.19.5).\n\nDPKGSHELLREASON\nDefined by dpkg on the shell spawned on the conffile prompt to\nexamine the situation (since dpkg 1.15.6).  Current valid value:\nconffile-prompt.\n\nDPKGCONFFILEOLD\nDefined by dpkg on the shell spawned on the conffile prompt to\nexamine the situation (since dpkg 1.15.6).  Contains the path to\nthe old conffile.\n\nDPKGCONFFILENEW\nDefined by dpkg on the shell spawned on the conffile prompt to\nexamine the situation (since dpkg 1.15.6).  Contains the path to\nthe new conffile.\n\nDPKGHOOKACTION\nDefined by dpkg on the shell spawned when executing a hook action\n(since dpkg 1.15.4).  Contains the current dpkg action.\n\nDPKGRUNNINGVERSION\nDefined by dpkg on the maintainer script environment to the version\nof the currently running dpkg instance (since dpkg 1.14.17).\n\nDPKGMAINTSCRIPTPACKAGE\nDefined by dpkg on the maintainer script environment to the (non-\narch-qualified) package name being handled (since dpkg 1.14.17).\n\nDPKGMAINTSCRIPTPACKAGEREFCOUNT\nDefined by dpkg on the maintainer script environment to the package\nreference count, i.e. the number of package instances with a state\ngreater than not-installed (since dpkg 1.17.2).\n\nDPKGMAINTSCRIPTARCH\nDefined by dpkg on the maintainer script environment to the\narchitecture the package got built for (since dpkg 1.15.4).\n\nDPKGMAINTSCRIPTNAME\nDefined by dpkg on the maintainer script environment to the name of\nthe script running, one of preinst, postinst, prerm or postrm\n(since dpkg 1.15.7).\n\nDPKGMAINTSCRIPTDEBUG\nDefined by dpkg on the maintainer script environment to a value\n('0' or '1') noting whether debugging has been requested (with the\n--debug option) for the maintainer scripts (since dpkg 1.18.4).\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z-]*\nConfiguration fragment files (since dpkg 1.15.4).\n\n/etc/dpkg/dpkg.cfg\nConfiguration file with default options.\n\n/var/log/dpkg.log\nDefault log file (see /etc/dpkg/dpkg.cfg and option --log).\n\nThe other files listed below are in their default directories, see\noption --admindir to see how to change locations of these files.\n\n/var/lib/dpkg/available\nList of available packages.\n\n/var/lib/dpkg/status\nStatuses of available packages. This file contains information\nabout whether a package is marked for removing or not, whether it\nis installed or not, etc. See section INFORMATION ABOUT PACKAGES\nfor more info.\n\nThe status file is backed up daily in /var/backups. It can be\nuseful if it's lost or corrupted due to filesystems troubles.\n\nThe format and contents of a binary package are described in deb(5).\n",
            "subsections": []
        },
        "BUGS": {
            "content": "--no-act usually gives less information than might be helpful.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To list installed packages related to the editor vi(1) (note that dpkg-\nquery does not load the available file anymore by default, and the\ndpkg-query --load-avail option should be used instead for that):\n\ndpkg -l '*vi*'\n\nTo see the entries in /var/lib/dpkg/available of two packages:\n\ndpkg --print-avail elvis vim | less\n\nTo search the listing of packages yourself:\n\nless /var/lib/dpkg/available\n\nTo remove an installed elvis package:\n\ndpkg -r elvis\n\nTo install a package, you first need to find it in an archive or CDROM.\nThe available file shows that the vim package is in section editors:\n\ncd /media/cdrom/pool/main/v/vim\ndpkg -i vim4.5-3.deb\n\nTo make a local copy of the package selection states:\n\ndpkg --get-selections> myselections\n\nYou might transfer this file to another computer, and after having\nupdated the available file there with your package manager frontend of\nchoice (see <https://wiki.debian.org/Teams/Dpkg/FAQ> for more details),\nfor example:\n\napt-cache dumpavail | dpkg --merge-avail\n\nor with dpkg 1.17.6 and earlier:\n\navail=$(mktemp)\napt-cache dumpavail> \"$avail\"\ndpkg --merge-avail \"$avail\"\nrm \"$avail\"\n\nyou can install it with:\n\ndpkg --clear-selections\ndpkg --set-selections <myselections\n\nNote that this will not actually install or remove anything, but just\nset the selection state on the requested packages. You will need some\nother application to actually download and install the requested\npackages. For example, run apt-get dselect-upgrade.\n\nOrdinarily, you will find that dselect(1) provides a more convenient\nway to modify the package selection states.\n",
            "subsections": []
        },
        "ADDITIONAL FUNCTIONALITY": {
            "content": "Additional functionality can be gained by installing any of the\nfollowing packages: apt, aptitude and debsums.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "aptitude(8), apt(8), dselect(1), dpkg-deb(1), dpkg-query(1), deb(5),\ndeb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "See /usr/share/doc/dpkg/THANKS for the list of people who have\ncontributed to dpkg.\n\n1.21.1                            2025-09-09                           dpkg(1)\nDpkg(3perl)                      libdpkg-perl                      Dpkg(3perl)\n",
            "subsections": []
        },
        "VARIABLES": {
            "content": "$Dpkg::PROGNAME\nContains the name of the current program.\n\n$Dpkg::PROGVERSION\nContains the version of the dpkg suite.\n\n$Dpkg::PROGMAKE\nContains the name of the system GNU make program.\n\n$Dpkg::PROGTAR\nContains the name of the system GNU tar program.\n\n$Dpkg::PROGPATCH\nContains the name of the system GNU patch program (or another\nimplementation that is directory traversal resistant).\n\n$Dpkg::CONFDIR\nContains the path to the dpkg system configuration directory.\n\n$Dpkg::ADMINDIR\nContains the path to the dpkg database directory.\n\n$Dpkg::LIBDIR\nContains the path to the dpkg methods and plugins directory.\n\n$Dpkg::DATADIR\nContains the path to the dpkg architecture tables directory.\n",
            "subsections": []
        },
        "MODULES": {
            "content": "The following is the list of public modules within the Dpkg hierarchy.\nOnly modules with versions 1.00 or higher, and only the interfaces\ndocumented in their POD are considered public.\n\nDpkg\nThis module, core variables.\n\nDpkg::Arch\nArchitecture handling functions.\n\nDpkg::Build::Info\nBuild information functions.\n\nDpkg::BuildFlags\nSet, modify and query compilation build flags.\n\nDpkg::BuildOptions\nParse and manipulate DEBBUILDOPTIONS.\n\nDpkg::BuildProfiles\nParse and manipulate build profiles.\n\nDpkg::Changelog\nParse changelogs.\n\nDpkg::Changelog::Entry\nRepresents a changelog entry.\n\nDpkg::Changelog::Parse\nGeneric changelog parser for dpkg-parsechangelog.\n\nDpkg::Checksums\nGenerate and parse checksums.\n\nDpkg::Compression\nSimple database of available compression methods.\n\nDpkg::Compression::FileHandle\nTransparently compress and decompress files.\n\nDpkg::Compression::Process\nWrapper around compression tools.\n\nDpkg::Conf\nParse dpkg configuration files.\n\nDpkg::Control\nParse and manipulate Debian control information (.dsc, .changes,\nPackages/Sources entries, etc.).\n\nDpkg::Control::Changelog\nRepresent fields output by dpkg-parsechangelog.\n\nDpkg::Control::Fields\nManage (list of known) control fields.\n\nDpkg::Control::Hash\nParse and manipulate a block of RFC822-like fields.\n\nDpkg::Control::Info\nParse files like debian/control.\n\nDpkg::Control::Tests\nParse files like debian/tests/control.\n\nDpkg::Control::Tests::Entry\nRepresents a debian/tests/control stanza.\n\nDpkg::Deps\nParse and manipulate dependencies.\n\nDpkg::Deps::Simple\nRepresents a single dependency statement.\n\nDpkg::Deps::Multiple\nBase module to represent multiple dependencies.\n\nDpkg::Deps::Union\nList of unrelated dependencies.\n\nDpkg::Deps::AND\nList of AND dependencies.\n\nDpkg::Deps::OR\nList of OR dependencies.\n\nDpkg::Deps::KnownFacts\nList of installed and virtual packages.\n\nDpkg::Exit\nPush, pop and run exit handlers.\n\nDpkg::Gettext\nWrapper around Locale::gettext.\n\nDpkg::IPC\nSpawn sub-processes and feed/retrieve data.\n\nDpkg::Index\nCollections of Dpkg::Control (Packages/Sources files for example).\n\nDpkg::Interface::Storable\nBase object serializer.\n\nDpkg::Path\nCommon path handling functions.\n\nDpkg::Source::Format\nParse and manipulate debian/source/format files.\n\nDpkg::Source::Package\nExtract Debian source packages.\n\nDpkg::Substvars\nSubstitute variables in strings.\n\nDpkg::Vendor\nIdentify current distribution vendor.\n\nDpkg::Version\nParse and manipulate Debian package versions.\n",
            "subsections": []
        },
        "CHANGES": {
            "content": "Version 2.00 (dpkg 1.20.0)\nRemove variables: $version, $progname, $admindir, $dpkglibdir and\n$pkgdatadir.\n\nVersion 1.03 (dpkg 1.18.24)\nNew variable: $PROGPATCH.\n\nVersion 1.02 (dpkg 1.18.11)\nNew variable: $PROGTAR, $PROGMAKE.\n\nVersion 1.01 (dpkg 1.17.0)\nNew variables: $PROGNAME, $PROGVERSION, $CONFDIR, $ADMINDIR, $LIBDIR\nand $DATADIR.\n\nDeprecated variables: $version, $admindir, $dpkglibdir and $pkgdatadir.\n\nVersion 1.00 (dpkg 1.15.6)\nMark the module as public.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "See the header comment on each module for their particular license.\n\n1.21.1                            2025-09-09                       Dpkg(3perl)",
            "subsections": []
        }
    },
    "summary": "dpkg - package manager for Debian",
    "flags": [
        {
            "flag": "-B",
            "long": "--auto-deconfigure",
            "arg": null,
            "description": "When a package is removed, there is a possibility that another installed package depended on the removed package. Specifying this option will cause automatic deconfiguration of the package which depended on the removed package. -Doctal, --debug=octal Switch debugging on. octal is formed by bitwise-ORing desired values together from the list below (note that these values may change in future releases). -Dh or --debug=help display these debugging values. Number Description 1 Generally helpful progress information 2 Invocation and status of maintainer scripts 10 Output for each file processed 100 Lots of output for each file processed 20 Output for each configuration file 200 Lots of output for each configuration file 40 Dependencies and conflicts 400 Lots of dependencies/conflicts output 10000 Trigger activation and processing 20000 Lots of output regarding triggers 40000 Silly amounts of output regarding triggers 1000 Lots of drivel about e.g. the dpkg/info dir 2000 Insane amounts of drivel"
        },
        {
            "flag": "",
            "long": "--force-things",
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--refuse-things",
            "arg": null,
            "description": "Force or refuse (no-force and refuse mean the same thing) to do some things. things is a comma separated list of things specified below. --force-help displays a message describing them. Things marked with (*) are forced by default. Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system. all: Turns on (or off) all force options. downgrade(*): Install a package, even if newer version of it is already installed. Warning: At present dpkg does not do any dependency checking on downgrades and therefore will not warn you if the downgrade breaks the dependency of some other package. This can have serious side effects, downgrading essential system components can even make your whole system unusable. Use with care. configure-any: Configure also any unpacked but unconfigured packages on which the current package depends. hold: Allow automatic installs, upgrades or removals of packages even when marked to be on \"hold\". Note: This does not prevent these actions when requested explicitly. remove-reinstreq: Remove a package, even if it's broken and marked to require reinstallation. This may, for example, cause parts of the package to remain on the system, which will then be forgotten by dpkg. remove-protected: Remove, even if the package is considered protected (since dpkg 1.20.1). Protected packages contain mostly important system boot infrastructure. Removing them might cause the whole system to be unable to boot, so use with caution. remove-essential: Remove, even if the package is considered essential. Essential packages contain mostly very basic Unix commands. Removing them might cause the whole system to stop working, so use with caution. depends: Turn all dependency problems into warnings. This affects the Pre-Depends and Depends fields. depends-version: Don't care about versions when checking dependencies. This affects the Pre-Depends and Depends fields. breaks: Install, even if this would break another package (since dpkg 1.14.6). This affects the Breaks field. conflicts: Install, even if it conflicts with another package. This is dangerous, for it will usually cause overwriting of some files. This affects the Conflicts field. confmiss: Always install the missing conffile without prompting. This is dangerous, since it means not preserving a change (removing) made to the file. confnew: If a conffile has been modified and the version in the package did change, always install the new version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred. confold: If a conffile has been modified and the version in the package did change, always keep the old version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred. confdef: If a conffile has been modified and the version in the package did change, always choose the default action without prompting. If there is no default action it will stop to ask the user unless --force-confnew or --force-confold is also been given, in which case it will use that to decide the final action. confask: If a conffile has been modified always offer to replace it with the version in the package, even if the version in the package did not change (since dpkg 1.15.8). If any of --force-confnew, --force-confold, or --force-confdef is also given, it will be used to decide the final action. overwrite: Overwrite one package's file with another's file. overwrite-dir: Overwrite one package's directory with another's file. overwrite-diverted: Overwrite a diverted file with an undiverted version. statoverride-add: Overwrite an existing stat override when adding it (since dpkg 1.19.5). statoverride-remove: Ignore a missing stat override when removing it (since dpkg 1.19.5). security-mac(*): Use platform-specific Mandatory Access Controls (MAC) based security when installing files into the filesystem (since dpkg 1.19.5). On Linux systems the implementation uses SELinux. unsafe-io: Do not perform safe I/O operations when unpacking (since dpkg 1.15.8.6). Currently this implies not performing file system syncs before file renames, which is known to cause substantial performance degradation on some file systems, unfortunately the ones that require the safe I/O on the first place due to their unreliable behaviour causing zero-length files on abrupt system crashes. Note: For ext4, the main offender, consider using instead the mount option nodelalloc, which will fix both the performance degradation and the data safety issues, the latter by making the file system not produce zero-length files on abrupt system crashes with any software not doing syncs before atomic renames. Warning: Using this option might improve performance at the cost of losing data, use with care. script-chrootless: Run maintainer scripts without chroot(2)ing into instdir even if the package does not support this mode of operation (since dpkg 1.18.5). Warning: This can destroy your host system, use with extreme care. architecture: Process even packages with wrong or no architecture. bad-version: Process even packages with wrong versions (since dpkg 1.16.1). bad-path: PATH is missing important programs, so problems are likely. not-root: Try to (de)install things even when not root. bad-verify: Install a package even if it fails authenticity check. --ignore-depends=package,... Ignore dependency-checking for specified packages (actually, checking is performed, but only warnings about conflicts are given, nothing else). This affects the Pre-Depends, Depends and Breaks fields."
        },
        {
            "flag": "",
            "long": "--simulate",
            "arg": null,
            "description": "Do everything which is supposed to be done, but don't write any changes. This is used to see what would happen with the specified action, without actually modifying anything. Be sure to give --no-act before the action-parameter, or you might end up with undesirable results. (e.g. dpkg --purge foo --no-act will first purge package \"foo\" and then try to purge package \"--no-act\", even though you probably expected it to actually do nothing)."
        },
        {
            "flag": "-R",
            "long": "--recursive",
            "arg": null,
            "description": "Recursively handle all regular files matching pattern *.deb found at specified directories and all of its subdirectories. This can be used with -i, -A, --install, --unpack and --record-avail actions. -G Don't install a package if a newer version of the same package is already installed. This is an alias of --refuse-downgrade. --admindir=dir Set the administrative directory to directory. This directory contains many files that give information about status of installed or uninstalled packages, etc. Defaults to <</var/lib/dpkg>>. --instdir=dir Set the installation directory, which refers to the directory where packages are to be installed. instdir is also the directory passed to chroot(2) before running package's installation scripts, which means that the scripts see instdir as a root directory. Defaults to <</>>. --root=dir Set the root directory to directory, which sets the installation directory to <<dir>> and the administrative directory to <<dir/var/lib/dpkg>>."
        },
        {
            "flag": "-O",
            "long": "--selected-only",
            "arg": null,
            "description": "Only process the packages that are selected for installation. The actual marking is done with dselect or by dpkg, when it handles packages. For example, when a package is removed, it will be marked selected for deinstallation."
        },
        {
            "flag": "-E",
            "long": "--skip-same-version",
            "arg": null,
            "description": "Don't install the package if the same version of the package is already installed. --pre-invoke=command --post-invoke=command Set an invoke hook command to be run via \"sh -c\" before or after the dpkg run for the unpack, configure, install, triggers-only, remove, purge, add-architecture and remove-architecture dpkg actions (since dpkg 1.15.4; add-architecture and remove- architecture actions since dpkg 1.17.19). This option can be specified multiple times. The order the options are specified is preserved, with the ones from the configuration files taking precedence. The environment variable DPKGHOOKACTION is set for the hooks to the current dpkg action. Note: Front-ends might call dpkg several times per invocation, which might run the hooks more times than expected. --path-exclude=glob-pattern --path-include=glob-pattern Set glob-pattern as a path filter, either by excluding or re- including previously excluded paths matching the specified patterns during install (since dpkg 1.15.8). Warning: Take into account that depending on the excluded paths you might completely break your system, use with caution. The glob patterns use the same wildcards used in the shell, were '*' matches any sequence of characters, including the empty string and also '/'. For example, <</usr/*/READ*>> matches <</usr/share/doc/package/README>>. As usual, '?' matches any single character (again, including '/'). And '[' starts a character class, which can contain a list of characters, ranges and complementations. See glob(7) for detailed information about globbing. Note: The current implementation might re-include more directories and symlinks than needed, in particular when there is a more specific re-inclusion, to be on the safe side and avoid possible unpack failures; future work might fix this. This can be used to remove all paths except some particular ones; a typical case is: --path-exclude=/usr/share/doc/* --path-include=/usr/share/doc/*/copyright to remove all documentation files except the copyright files. These two options can be specified multiple times, and interleaved with each other. Both are processed in the given order, with the last rule that matches a file name making the decision. The filters are applied when unpacking the binary packages, and as such only have knowledge of the type of object currently being filtered (e.g. a normal file or a directory) and have not visibility of what objects will come next. Because these filters have side effects (in contrast to find(1) filters), excluding an exact pathname that happens to be a directory object like /usr/share/doc will not have the desired result, and only that pathname will be excluded (which could be automatically reincluded if the code sees the need). Any subsequent files contained within that directory will fail to unpack. Hint: make sure the globs are not expanded by your shell. --verify-format format-name Sets the output format for the --verify command (since dpkg 1.17.2). The only currently supported output format is rpm, which consists of a line for every path that failed any check. These lines have the following format: missing [c] pathname [(error-message)] ??5?????? [c] pathname The first 9 characters are used to report the checks result, either a literal missing when the file is not present or its metadata cannot be fetched, or one of the following special characters that report the result for each check: '?' Implies the check could not be done (lack of support, file permissions, etc). '.' Implies the check passed. 'A-Za-z0-9' Implies a specific check failed. The following positions and alphanumeric characters are currently supported: 1 '?' These checks are currently not supported, will always be '?'. 2 'M' The file mode check failed (since dpkg 1.21.0). Because pathname metadata is currently not tracked, this check can only be partially emulated via a very simple heuristic for pathnames that have a known digest, which implies they should be regular files, where the check will fail if the pathname is not a regular file on the filesystem. This check will currently never succeed as it does not have enough information available. 3 '5' The digest check failed, which means the file contents have changed. 4-9 '?' These checks are currently not supported, will always be '?'. The line is followed by a space and an attribute character. The following attribute character is supported: 'c' The pathname is a conffile. Finally followed by another space and the pathname. In case the entry was of the missing type, and the file was not actually present on the filesystem, then the line is followed by a space and the error message enclosed within parenthesis. --status-fd n Send machine-readable package status and progress information to file descriptor n. This option can be specified multiple times. The information is generally one record per line, in one of the following forms: status: package: status Package status changed; status is as in the status file. status: package : error : extended-error-message An error occurred. Any possible newlines in extended-error- message will be converted to spaces before output. status: file : conffile-prompt : 'real-old' 'real-new' useredited distedited User is being asked a conffile question. processing: stage: package Sent just before a processing stage starts. stage is one of upgrade, install (both sent before unpacking), configure, trigproc, disappear, remove, purge. --status-logger=command Send machine-readable package status and progress information to the shell command's standard input, to be run via \"sh -c\" (since dpkg 1.16.0). This option can be specified multiple times. The output format used is the same as in --status-fd. --log=filename Log status change updates and actions to filename, instead of the default /var/log/dpkg.log. If this option is given multiple times, the last filename is used. Log messages are of the form: YYYY-MM-DD HH:MM:SS startup type command For each dpkg invocation where type is archives (with a command of unpack or install) or packages (with a command of configure, triggers-only, remove or purge). YYYY-MM-DD HH:MM:SS status state pkg installed-version For status change updates. YYYY-MM-DD HH:MM:SS action pkg installed-version available-version For actions where action is one of install, upgrade, configure, trigproc, disappear, remove or purge. YYYY-MM-DD HH:MM:SS conffile filename decision For conffile changes where decision is either install or keep."
        },
        {
            "flag": "",
            "long": "--robot",
            "arg": null,
            "description": "Use a machine-readable output format. This provides an interface for programs that need to parse the output of some of the commands that do not otherwise emit a machine-readable output format. No localization will be used, and the output will be modified to make it easier to parse. The only currently supported command is --version."
        },
        {
            "flag": "",
            "long": "--no-pager",
            "arg": null,
            "description": "Disables the use of any pager when showing information (since dpkg 1.19.2)."
        },
        {
            "flag": "",
            "long": "--no-debsig",
            "arg": null,
            "description": "Do not try to verify package signatures."
        },
        {
            "flag": "",
            "long": "--no-triggers",
            "arg": null,
            "description": "Do not run any triggers in this run (since dpkg 1.14.17), but activations will still be recorded. If used with --configure package or --triggers-only package then the named package postinst will still be run even if only a triggers run is needed. Use of this option may leave packages in the improper triggers-awaited and triggers-pending states. This can be fixed later by running: dpkg --configure --pending."
        },
        {
            "flag": "",
            "long": "--triggers",
            "arg": null,
            "description": "Cancels a previous --no-triggers (since dpkg 1.14.17)."
        }
    ],
    "examples": [
        "To list installed packages related to the editor vi(1) (note that dpkg-",
        "query does not load the available file anymore by default, and the",
        "dpkg-query --load-avail option should be used instead for that):",
        "dpkg -l '*vi*'",
        "To see the entries in /var/lib/dpkg/available of two packages:",
        "dpkg --print-avail elvis vim | less",
        "To search the listing of packages yourself:",
        "less /var/lib/dpkg/available",
        "To remove an installed elvis package:",
        "dpkg -r elvis",
        "To install a package, you first need to find it in an archive or CDROM.",
        "The available file shows that the vim package is in section editors:",
        "cd /media/cdrom/pool/main/v/vim",
        "dpkg -i vim4.5-3.deb",
        "To make a local copy of the package selection states:",
        "dpkg --get-selections> myselections",
        "You might transfer this file to another computer, and after having",
        "updated the available file there with your package manager frontend of",
        "choice (see <https://wiki.debian.org/Teams/Dpkg/FAQ> for more details),",
        "for example:",
        "apt-cache dumpavail | dpkg --merge-avail",
        "or with dpkg 1.17.6 and earlier:",
        "avail=$(mktemp)",
        "apt-cache dumpavail> \"$avail\"",
        "dpkg --merge-avail \"$avail\"",
        "rm \"$avail\"",
        "you can install it with:",
        "dpkg --clear-selections",
        "dpkg --set-selections <myselections",
        "Note that this will not actually install or remove anything, but just",
        "set the selection state on the requested packages. You will need some",
        "other application to actually download and install the requested",
        "packages. For example, run apt-get dselect-upgrade.",
        "Ordinarily, you will find that dselect(1) provides a more convenient",
        "way to modify the package selection states."
    ],
    "see_also": [
        {
            "name": "aptitude",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/aptitude/8/json"
        },
        {
            "name": "apt",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apt/8/json"
        },
        {
            "name": "dselect",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dselect/1/json"
        },
        {
            "name": "dpkg-deb",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg-deb/1/json"
        },
        {
            "name": "dpkg-query",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg-query/1/json"
        },
        {
            "name": "deb",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/deb/5/json"
        },
        {
            "name": "deb-control",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/deb-control/5/json"
        },
        {
            "name": "dpkg.cfg",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg.cfg/5/json"
        },
        {
            "name": "dpkg-reconfigure",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg-reconfigure/8/json"
        }
    ]
}