{
    "mode": "man",
    "parameter": "apt-get",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/apt-get/8/json",
    "generated": "2026-06-10T16:22:14Z",
    "synopsis": "apt-get [-asqdyfmubV] [-o=configstring] [-c=configfile] [-t=targetrelease]\n[-a=architecture] {update | upgrade | dselect-upgrade | dist-upgrade |\ninstall pkg [{=pkgversionnumber | /targetrelease}]...  | remove pkg...  |\npurge pkg...  | source pkg [{=pkgversionnumber | /targetrelease}]...  |\nbuild-dep pkg [{=pkgversionnumber | /targetrelease}]...  |\ndownload pkg [{=pkgversionnumber | /targetrelease}]...  | check | clean |\nautoclean | autoremove | {-v | --version} | {-h | --help}}",
    "sections": {
        "NAME": {
            "content": "apt-get - APT package handling utility -- command-line interface\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "apt-get [-asqdyfmubV] [-o=configstring] [-c=configfile] [-t=targetrelease]\n[-a=architecture] {update | upgrade | dselect-upgrade | dist-upgrade |\ninstall pkg [{=pkgversionnumber | /targetrelease}]...  | remove pkg...  |\npurge pkg...  | source pkg [{=pkgversionnumber | /targetrelease}]...  |\nbuild-dep pkg [{=pkgversionnumber | /targetrelease}]...  |\ndownload pkg [{=pkgversionnumber | /targetrelease}]...  | check | clean |\nautoclean | autoremove | {-v | --version} | {-h | --help}}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "apt-get is the command-line tool for handling packages, and may be considered the user's\n\"back-end\" to other tools using the APT library. Several \"front-end\" interfaces exist, such\nas aptitude(8), synaptic(8) and wajig(1).\n\nUnless the -h, or --help option is given, one of the commands below must be present.\n",
            "subsections": [
                {
                    "name": "update",
                    "content": "update is used to resynchronize the package index files from their sources. The indexes\nof available packages are fetched from the location(s) specified in\n/etc/apt/sources.list. For example, when using a Debian archive, this command retrieves\nand scans the Packages.gz files, so that information about new and updated packages is\navailable. An update should always be performed before an upgrade or dist-upgrade. Please\nbe aware that the overall progress meter will be incorrect as the size of the package\nfiles cannot be known in advance.\n"
                },
                {
                    "name": "upgrade",
                    "content": "upgrade is used to install the newest versions of all packages currently installed on the\nsystem from the sources enumerated in /etc/apt/sources.list. Packages currently installed\nwith new versions available are retrieved and upgraded; under no circumstances are\ncurrently installed packages removed, or packages not already installed retrieved and\ninstalled. New versions of currently installed packages that cannot be upgraded without\nchanging the install status of another package will be left at their current version. An\nupdate must be performed first so that apt-get knows that new versions of packages are\navailable.\n"
                },
                {
                    "name": "dist-upgrade",
                    "content": "dist-upgrade in addition to performing the function of upgrade, also intelligently\nhandles changing dependencies with new versions of packages; apt-get has a \"smart\"\nconflict resolution system, and it will attempt to upgrade the most important packages at\nthe expense of less important ones if necessary. The dist-upgrade command may therefore\nremove some packages. The /etc/apt/sources.list file contains a list of locations from\nwhich to retrieve desired package files. See also aptpreferences(5) for a mechanism for\noverriding the general settings for individual packages.\n"
                },
                {
                    "name": "dselect-upgrade",
                    "content": "dselect-upgrade is used in conjunction with the traditional Debian packaging front-end,\ndselect(1).  dselect-upgrade follows the changes made by dselect(1) to the Status field\nof available packages, and performs the actions necessary to realize that state (for\ninstance, the removal of old and the installation of new packages).\n"
                },
                {
                    "name": "install",
                    "content": "install is followed by one or more packages desired for installation or upgrading. Each\npackage is a package name, not a fully qualified filename (for instance, in a Debian\nsystem, apt-utils would be the argument provided, not apt-utils2.4.14amd64.deb). All\npackages required by the package(s) specified for installation will also be retrieved and\ninstalled. The /etc/apt/sources.list file is used to locate the desired packages. If a\nhyphen is appended to the package name (with no intervening space), the identified\npackage will be removed if it is installed. Similarly a plus sign can be used to\ndesignate a package to install. These latter features may be used to override decisions\nmade by apt-get's conflict resolution system.\n\nA specific version of a package can be selected for installation by following the package\nname with an equals and the version of the package to select. This will cause that\nversion to be located and selected for install. Alternatively a specific distribution can\nbe selected by following the package name with a slash and the version of the\ndistribution or the Archive name (stable, testing, unstable).\n\nBoth of the version selection mechanisms can downgrade packages and must be used with\ncare.\n\nThis is also the target to use if you want to upgrade one or more already-installed\npackages without upgrading every package you have on your system. Unlike the \"upgrade\"\ntarget, which installs the newest version of all currently installed packages, \"install\"\nwill install the newest version of only the package(s) specified. Simply provide the name\nof the package(s) you wish to upgrade, and if a newer version is available, it (and its\ndependencies, as described above) will be downloaded and installed.\n\nFinally, the aptpreferences(5) mechanism allows you to create an alternative\ninstallation policy for individual packages.\n\nIf no package matches the given expression and the expression contains one of '.', '?' or\n'*' then it is assumed to be a POSIX regular expression, and it is applied to all package\nnames in the database. Any matches are then installed (or removed). Note that matching is\ndone by substring so 'lo.*' matches 'how-lo' and 'lowest'. If this is undesired, anchor\nthe regular expression with a '^' or '$' character, or create a more specific regular\nexpression.\n\nFallback to regular expressions is deprecated in APT 2.0, has been removed in apt(8),\nexcept for anchored expressions, and will be removed from apt-get(8) in a future version.\nUse apt-patterns(5) instead.\n"
                },
                {
                    "name": "reinstall",
                    "content": "reinstall is an alias for install --reinstall.\n"
                },
                {
                    "name": "remove",
                    "content": "remove is identical to install except that packages are removed instead of installed.\nNote that removing a package leaves its configuration files on the system. If a plus sign\nis appended to the package name (with no intervening space), the identified package will\nbe installed instead of removed.\n"
                },
                {
                    "name": "purge",
                    "content": "purge is identical to remove except that packages are removed and purged (any\nconfiguration files are deleted too).\n"
                },
                {
                    "name": "source",
                    "content": "source causes apt-get to fetch source packages. APT will examine the available packages\nto decide which source package to fetch. It will then find and download into the current\ndirectory the newest available version of that source package while respecting the\ndefault release, set with the option APT::Default-Release, the -t option or per package\nwith the pkg/release syntax, if possible.\n\nThe arguments are interpreted as binary and source package names. See the --only-source\noption if you want to change that.\n\nSource packages are tracked separately from binary packages via deb-src lines in the\nsources.list(5) file. This means that you will need to add such a line for each\nrepository you want to get sources from; otherwise you will probably get either the wrong\n(too old/too new) source versions or none at all.\n\nIf the --compile option is specified then the package will be compiled to a binary .deb\nusing dpkg-buildpackage for the architecture as defined by the --host-architecture\noption. If --download-only is specified then the source package will not be unpacked.\n\nA specific source version can be retrieved by postfixing the source name with an equals\nand then the version to fetch, similar to the mechanism used for the package files. This\nenables exact matching of the source package name and version, implicitly enabling the\nAPT::Get::Only-Source option.\n\nNote that source packages are not installed and tracked in the dpkg database like binary\npackages; they are simply downloaded to the current directory, like source tarballs.\n"
                },
                {
                    "name": "build-dep",
                    "content": "build-dep causes apt-get to install/remove packages in an attempt to satisfy the build\ndependencies for a source package. By default the dependencies are satisfied to build the\npackage natively. If desired a host-architecture can be specified with the\n--host-architecture option instead.\n\nThe arguments are interpreted as binary or source package names. See the --only-source\noption if you want to change that.\n"
                },
                {
                    "name": "satisfy",
                    "content": "satisfy causes apt-get to satisfy the given dependency strings. The dependency strings\nmay have build profiles and architecture restriction list as in build dependencies. They\nmay optionally be prefixed with \"Conflicts: \" to unsatisfy the dependency string.\nMultiple strings of the same type can be specified.\n\nExample: apt-get satisfy \"foo\" \"Conflicts: bar\" \"baz (>> 1.0) | bar (= 2.0), moo\"\n\nThe legacy operator '</>' is not supported, use '<=/>=' instead.\n"
                },
                {
                    "name": "check",
                    "content": "check is a diagnostic tool; it updates the package cache and checks for broken\ndependencies.\n"
                },
                {
                    "name": "download",
                    "content": "download will download the given binary package into the current directory.\n"
                },
                {
                    "name": "clean",
                    "content": "clean clears out the local repository of retrieved package files. It removes everything\nbut the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.\n\nautoclean (and the auto-clean alias since 1.1)\nLike clean, autoclean clears out the local repository of retrieved package files. The\ndifference is that it only removes package files that can no longer be downloaded, and\nare largely useless. This allows a cache to be maintained over a long period without it\ngrowing out of control. The configuration option APT::Clean-Installed will prevent\ninstalled packages from being erased if it is set to off.\n\nautoremove (and the auto-remove alias since 1.1)\nautoremove is used to remove packages that were automatically installed to satisfy\ndependencies for other packages and are now no longer needed.\n"
                },
                {
                    "name": "changelog",
                    "content": "changelog tries to download the changelog of a package and displays it through\nsensible-pager. By default it displays the changelog for the version that is installed.\nHowever, you can specify the same options as for the install command.\n"
                },
                {
                    "name": "indextargets",
                    "content": "Displays by default a deb822 formatted listing of information about all data files (aka\nindex targets) apt-get update would download. Supports a --format option to modify the\noutput format as well as accepts lines of the default output to filter the records by.\nThe command is mainly used as an interface for external tools working with APT to get\ninformation as well as filenames for downloaded files so they can use them as well\ninstead of downloading them again on their own. Detailed documentation is omitted here\nand can instead be found in the file /usr/share/doc/apt/acquire-additional-files.md.gz\nshipped by the apt-doc package.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "All command line options may be set using the configuration file, the descriptions indicate\nthe configuration option to set. For boolean options you can override the config file by\nusing something like -f-,--no-f, -f=no or several other variations.\n",
            "subsections": [
                {
                    "name": "--no-install-recommends",
                    "content": "Do not consider recommended packages as a dependency for installing. Configuration Item:\nAPT::Install-Recommends.\n",
                    "long": "--no-install-recommends"
                },
                {
                    "name": "--install-suggests",
                    "content": "Consider suggested packages as a dependency for installing. Configuration Item:\nAPT::Install-Suggests.\n",
                    "long": "--install-suggests"
                },
                {
                    "name": "-d --download-only",
                    "content": "Download only; package files are only retrieved, not unpacked or installed. Configuration\nItem: APT::Get::Download-Only.\n",
                    "flag": "-d",
                    "long": "--download-only"
                },
                {
                    "name": "-f --fix-broken",
                    "content": "Fix; attempt to correct a system with broken dependencies in place. This option, when\nused with install/remove, can omit any packages to permit APT to deduce a likely\nsolution. If packages are specified, these have to completely correct the problem. The\noption is sometimes necessary when running APT for the first time; APT itself does not\nallow broken package dependencies to exist on a system. It is possible that a system's\ndependency structure can be so corrupt as to require manual intervention (which usually\nmeans using dpkg --remove to eliminate some of the offending packages). Use of this\noption together with -m may produce an error in some situations. Configuration Item:\nAPT::Get::Fix-Broken.\n",
                    "flag": "-f",
                    "long": "--fix-broken"
                },
                {
                    "name": "-m --ignore-missing --fix-missing",
                    "content": "Ignore missing packages; if packages cannot be retrieved or fail the integrity check\nafter retrieval (corrupted package files), hold back those packages and handle the\nresult. Use of this option together with -f may produce an error in some situations. If a\npackage is selected for installation (particularly if it is mentioned on the command\nline) and it could not be downloaded then it will be silently held back. Configuration\nItem: APT::Get::Fix-Missing.\n",
                    "flag": "-m",
                    "long": "--fix-missing"
                },
                {
                    "name": "--no-download",
                    "content": "Disables downloading of packages. This is best used with --ignore-missing to force APT to\nuse only the .debs it has already downloaded. Configuration Item: APT::Get::Download.\n",
                    "long": "--no-download"
                },
                {
                    "name": "-q --quiet",
                    "content": "Quiet; produces output suitable for logging, omitting progress indicators. More q's will\nproduce more quiet up to a maximum of 2. You can also use -q=# to set the quiet level,\noverriding the configuration file. Note that quiet level 2 implies -y; you should never\nuse -qq without a no-action modifier such as -d, --print-uris or -s as APT may decide to\ndo something you did not expect. Configuration Item: quiet.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-s --simulate --just-print --dry-run --recon --no-act",
                    "content": "No action; perform a simulation of events that would occur based on the current system\nstate but do not actually change the system. Locking will be disabled (Debug::NoLocking)\nso the system state could change while apt-get is running. Simulations can also be\nexecuted by non-root users which might not have read access to all apt configuration\ndistorting the simulation. A notice expressing this warning is also shown by default for\nnon-root users (APT::Get::Show-User-Simulation-Note). Configuration Item:\nAPT::Get::Simulate.\n\nSimulated runs print out a series of lines, each representing a dpkg operation: configure\n(Conf), remove (Remv) or unpack (Inst). Square brackets indicate broken packages, and\nempty square brackets indicate breaks that are of no consequence (rare).\n",
                    "flag": "-s",
                    "long": "--no-act"
                },
                {
                    "name": "-y --yes --assume-yes",
                    "content": "Automatic yes to prompts; assume \"yes\" as answer to all prompts and run\nnon-interactively. If an undesirable situation, such as changing a held package, trying\nto install an unauthenticated package or removing an essential package occurs then\napt-get will abort. Configuration Item: APT::Get::Assume-Yes.\n",
                    "flag": "-y",
                    "long": "--assume-yes"
                },
                {
                    "name": "--assume-no",
                    "content": "Automatic \"no\" to all prompts. Configuration Item: APT::Get::Assume-No.\n",
                    "long": "--assume-no"
                },
                {
                    "name": "--no-show-upgraded",
                    "content": "Do not show a list of all packages that are to be upgraded. Configuration Item:\nAPT::Get::Show-Upgraded.\n",
                    "long": "--no-show-upgraded"
                },
                {
                    "name": "-V --verbose-versions",
                    "content": "Show full versions for upgraded and installed packages. Configuration Item:\nAPT::Get::Show-Versions.\n",
                    "flag": "-V",
                    "long": "--verbose-versions"
                },
                {
                    "name": "-a --host-architecture",
                    "content": "This option controls the architecture packages are built for by apt-get source --compile\nand how cross-builddependencies are satisfied. By default is it not set which means that\nthe host architecture is the same as the build architecture (which is defined by\nAPT::Architecture). Configuration Item: APT::Get::Host-Architecture.\n",
                    "flag": "-a",
                    "long": "--host-architecture"
                },
                {
                    "name": "-P --build-profiles",
                    "content": "This option controls the activated build profiles for which a source package is built by\napt-get source --compile and how build dependencies are satisfied. By default no build\nprofile is active. More than one build profile can be activated at a time by\nconcatenating them with a comma. Configuration Item: APT::Build-Profiles.\n",
                    "flag": "-P",
                    "long": "--build-profiles"
                },
                {
                    "name": "-b --compile --build",
                    "content": "Compile source packages after downloading them. Configuration Item: APT::Get::Compile.\n",
                    "flag": "-b",
                    "long": "--build"
                },
                {
                    "name": "--ignore-hold",
                    "content": "Ignore package holds; this causes apt-get to ignore a hold placed on a package. This may\nbe useful in conjunction with dist-upgrade to override a large number of undesired holds.\nConfiguration Item: APT::Ignore-Hold.\n",
                    "long": "--ignore-hold"
                },
                {
                    "name": "--with-new-pkgs",
                    "content": "Allow installing new packages when used in conjunction with upgrade. This is useful if\nthe update of an installed package requires new dependencies to be installed. Instead of\nholding the package back upgrade will upgrade the package and install the new\ndependencies. Note that upgrade with this option will never remove packages, only allow\nadding new ones. Configuration Item: APT::Get::Upgrade-Allow-New.\n",
                    "long": "--with-new-pkgs"
                },
                {
                    "name": "--no-upgrade",
                    "content": "Do not upgrade packages; when used in conjunction with install, no-upgrade will prevent\npackages on the command line from being upgraded if they are already installed.\nConfiguration Item: APT::Get::Upgrade.\n",
                    "long": "--no-upgrade"
                },
                {
                    "name": "--only-upgrade",
                    "content": "Do not install new packages; when used in conjunction with install, only-upgrade will\ninstall upgrades for already installed packages only and ignore requests to install new\npackages. Configuration Item: APT::Get::Only-Upgrade.\n",
                    "long": "--only-upgrade"
                },
                {
                    "name": "--allow-downgrades",
                    "content": "This is a dangerous option that will cause apt to continue without prompting if it is\ndoing downgrades. It should not be used except in very special situations. Using it can\npotentially destroy your system! Configuration Item: APT::Get::allow-downgrades.\nIntroduced in APT 1.1.\n",
                    "long": "--allow-downgrades"
                },
                {
                    "name": "--allow-remove-essential",
                    "content": "Force yes; this is a dangerous option that will cause apt to continue without prompting\nif it is removing essentials. It should not be used except in very special situations.\nUsing it can potentially destroy your system! Configuration Item:\nAPT::Get::allow-remove-essential. Introduced in APT 1.1.\n",
                    "long": "--allow-remove-essential"
                },
                {
                    "name": "--allow-change-held-packages",
                    "content": "Force yes; this is a dangerous option that will cause apt to continue without prompting\nif it is changing held packages. It should not be used except in very special situations.\nUsing it can potentially destroy your system! Configuration Item:\nAPT::Get::allow-change-held-packages. Introduced in APT 1.1.\n",
                    "long": "--allow-change-held-packages"
                },
                {
                    "name": "--force-yes",
                    "content": "Force yes; this is a dangerous option that will cause apt to continue without prompting\nif it is doing something potentially harmful. It should not be used except in very\nspecial situations. Using force-yes can potentially destroy your system! Configuration\nItem: APT::Get::force-yes. This is deprecated and replaced by --allow-unauthenticated ,\n--allow-downgrades , --allow-remove-essential , --allow-change-held-packages in 1.1.\n",
                    "long": "--force-yes"
                },
                {
                    "name": "--print-uris",
                    "content": "Instead of fetching the files to install their URIs are printed. Each URI will have the\npath, the destination file name, the size and the expected MD5 hash. Note that the file\nname to write to will not always match the file name on the remote site! This also works\nwith the source and update commands. When used with the update command the MD5 and size\nare not included, and it is up to the user to decompress any compressed files.\nConfiguration Item: APT::Get::Print-URIs.\n",
                    "long": "--print-uris"
                },
                {
                    "name": "--purge",
                    "content": "Use purge instead of remove for anything that would be removed. An asterisk (\"*\") will be\ndisplayed next to packages which are scheduled to be purged.  remove --purge is\nequivalent to the purge command. Configuration Item: APT::Get::Purge.\n",
                    "long": "--purge"
                },
                {
                    "name": "--reinstall",
                    "content": "Re-install packages that are already installed and at the newest version. Configuration\nItem: APT::Get::ReInstall.\n",
                    "long": "--reinstall"
                },
                {
                    "name": "--list-cleanup",
                    "content": "This option is on by default; use --no-list-cleanup to turn it off. When it is on,\napt-get will automatically manage the contents of /var/lib/apt/lists to ensure that\nobsolete files are erased. The only reason to turn it off is if you frequently change\nyour sources list. Configuration Item: APT::Get::List-Cleanup.\n",
                    "long": "--list-cleanup"
                },
                {
                    "name": "-S --snapshot",
                    "content": "This option controls the snapshot chosen for archives with Snapshot: enable in the source\nentry. For example, -S 20220102T030405Z selects a snapshot from January 2nd, 2022 at\n03:04:05 UTC. Configuration Item: APT::Snapshot; see also the sources.list(5) manual\npage.\n",
                    "flag": "-S",
                    "long": "--snapshot"
                },
                {
                    "name": "-t --target-release --default-release",
                    "content": "This option controls the default input to the policy engine; it creates a default pin at\npriority 990 using the specified release string. This overrides the general settings in\n/etc/apt/preferences. Specifically pinned packages are not affected by the value of this\noption. In short, this option lets you have simple control over which distribution\npackages will be retrieved from. Some common examples might be -t '2.1*', -t unstable or\n-t sid. Configuration Item: APT::Default-Release; see also the aptpreferences(5) manual\npage.\n",
                    "flag": "-t",
                    "long": "--default-release"
                },
                {
                    "name": "--trivial-only",
                    "content": "Only perform operations that are 'trivial'. Logically this can be considered related to\n--assume-yes; where --assume-yes will answer yes to any prompt, --trivial-only will\nanswer no. Configuration Item: APT::Get::Trivial-Only.\n",
                    "long": "--trivial-only"
                },
                {
                    "name": "--mark-auto",
                    "content": "After successful installation, mark all freshly installed packages as automatically\ninstalled, which will cause each of the packages to be removed when no more manually\ninstalled packages depend on this package. This is equally to running apt-mark auto for\nall installed packages. Configuration Item: APT::Get::Mark-Auto.\n",
                    "long": "--mark-auto"
                },
                {
                    "name": "--no-remove",
                    "content": "If any packages are to be removed apt-get immediately aborts without prompting.\nConfiguration Item: APT::Get::Remove.\n\n--auto-remove, --autoremove\nIf the command is either install or remove, then this option acts like running the\nautoremove command, removing unused dependency packages. Configuration Item:\nAPT::Get::AutomaticRemove.\n",
                    "long": "--no-remove"
                },
                {
                    "name": "--only-source",
                    "content": "Only has meaning for the source and build-dep commands. Indicates that the given source\nnames are not to be mapped through the binary table. This means that if this option is\nspecified, these commands will only accept source package names as arguments, rather than\naccepting binary package names and looking up the corresponding source package.\nConfiguration Item: APT::Get::Only-Source.\n\n--diff-only, --dsc-only, --tar-only\nDownload only the diff, dsc, or tar file of a source archive. Configuration Item:\nAPT::Get::Diff-Only, APT::Get::Dsc-Only, and APT::Get::Tar-Only.\n",
                    "long": "--only-source"
                },
                {
                    "name": "--arch-only",
                    "content": "Only process architecture-dependent build-dependencies. Configuration Item:\nAPT::Get::Arch-Only.\n",
                    "long": "--arch-only"
                },
                {
                    "name": "--indep-only",
                    "content": "Only process architecture-independent build-dependencies. Configuration Item:\nAPT::Get::Indep-Only.\n",
                    "long": "--indep-only"
                },
                {
                    "name": "--allow-unauthenticated",
                    "content": "Ignore if packages can't be authenticated and don't prompt about it. This can be useful\nwhile working with local repositories, but is a huge security risk if data authenticity\nisn't ensured in another way by the user itself. The usage of the Trusted option for\nsources.list(5) entries should usually be preferred over this global override.\nConfiguration Item: APT::Get::AllowUnauthenticated.\n",
                    "long": "--allow-unauthenticated"
                },
                {
                    "name": "--no-allow-insecure-repositories",
                    "content": "Forbid the update command to acquire unverifiable data from configured sources. APT will\nfail at the update command for repositories without valid cryptographically signatures.\nSee also apt-secure(8) for details on the concept and the implications. Configuration\nItem: Acquire::AllowInsecureRepositories.\n",
                    "long": "--no-allow-insecure-repositories"
                },
                {
                    "name": "--allow-releaseinfo-change",
                    "content": "Allow the update command to continue downloading data from a repository which changed its\ninformation of the release contained in the repository indicating e.g a new major\nrelease. APT will fail at the update command for such repositories until the change is\nconfirmed to ensure the user is prepared for the change. See also apt-secure(8) for\ndetails on the concept and configuration.\n\nSpecialist options (--allow-releaseinfo-change-field) exist to allow changes only for\ncertain fields like origin, label, codename, suite, version and defaultpin. See also\naptpreferences(5). Configuration Item: Acquire::AllowReleaseInfoChange.\n",
                    "long": "--allow-releaseinfo-change"
                },
                {
                    "name": "--show-progress",
                    "content": "Show user friendly progress information in the terminal window when packages are\ninstalled, upgraded or removed. For a machine parsable version of this data see\nREADME.progress-reporting in the apt doc directory. Configuration Items: Dpkg::Progress\nand Dpkg::Progress-Fancy.\n\n--with-source filename\nAdds the given file as a source for metadata. Can be repeated to add multiple files. See\n--with-source description in apt-cache(8) for further details.\n",
                    "long": "--show-progress"
                },
                {
                    "name": "-e --error-on=",
                    "content": "Fail the update command if any error occured, even a transient one.\n",
                    "flag": "-e"
                },
                {
                    "name": "-h --help",
                    "content": "Show a short usage summary.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-v --version",
                    "content": "Show the program version.\n",
                    "flag": "-v",
                    "long": "--version"
                },
                {
                    "name": "-c --config-file",
                    "content": "Configuration File; Specify a configuration file to use. The program will read the\ndefault configuration file and then this configuration file. If configuration settings\nneed to be set before the default configuration files are parsed specify a file with the\nAPTCONFIG environment variable. See apt.conf(5) for syntax information.\n",
                    "flag": "-c",
                    "long": "--config-file"
                },
                {
                    "name": "-o --option",
                    "content": "Set a Configuration Option; This will set an arbitrary configuration option. The syntax\nis -o Foo::Bar=bar.  -o and --option can be used multiple times to set different options.\n",
                    "flag": "-o",
                    "long": "--option"
                }
            ]
        },
        "FILES": {
            "content": "/etc/apt/sources.list\nLocations to fetch packages from. Configuration Item: Dir::Etc::SourceList.\n\n/etc/apt/sources.list.d/\nFile fragments for locations to fetch packages from. Configuration Item:\nDir::Etc::SourceParts.\n\n/etc/apt/apt.conf\nAPT configuration file. Configuration Item: Dir::Etc::Main.\n\n/etc/apt/apt.conf.d/\nAPT configuration file fragments. Configuration Item: Dir::Etc::Parts.\n\n/etc/apt/preferences\nVersion preferences file. This is where you would specify \"pinning\", i.e. a preference to\nget certain packages from a separate source or from a different version of a\ndistribution. Configuration Item: Dir::Etc::Preferences.\n\n/etc/apt/preferences.d/\nFile fragments for the version preferences. Configuration Item:\nDir::Etc::PreferencesParts.\n\n/var/cache/apt/archives/\nStorage area for retrieved package files. Configuration Item: Dir::Cache::Archives.\n\n/var/cache/apt/archives/partial/\nStorage area for package files in transit. Configuration Item: Dir::Cache::Archives\n(partial will be implicitly appended)\n\n/var/lib/apt/lists/\nStorage area for state information for each package resource specified in sources.list(5)\nConfiguration Item: Dir::State::Lists.\n\n/var/lib/apt/lists/partial/\nStorage area for state information in transit. Configuration Item: Dir::State::Lists\n(partial will be implicitly appended)\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "apt-cache(8), apt-cdrom(8), dpkg(1), sources.list(5), apt.conf(5), apt-config(8), apt-\nsecure(8), The APT User's guide in /usr/share/doc/apt-doc/, aptpreferences(5), the APT\nHowto.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "apt-get returns zero on normal operation, decimal 100 on error.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "APT bug page[1]. If you wish to report a bug in APT, please see\n/usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "",
            "subsections": [
                {
                    "name": "Jason Gunthorpe",
                    "content": ""
                },
                {
                    "name": "APT team",
                    "content": ""
                }
            ]
        },
        "NOTES": {
            "content": "1. APT bug page\nhttp://bugs.debian.org/src:apt\n\n\n\nAPT 2.4.14                                 08 January 2021                                APT-GET(8)",
            "subsections": []
        }
    },
    "summary": "apt-get - APT package handling utility -- command-line interface",
    "flags": [
        {
            "flag": "",
            "long": "--no-install-recommends",
            "arg": null,
            "description": "Do not consider recommended packages as a dependency for installing. Configuration Item: APT::Install-Recommends."
        },
        {
            "flag": "",
            "long": "--install-suggests",
            "arg": null,
            "description": "Consider suggested packages as a dependency for installing. Configuration Item: APT::Install-Suggests."
        },
        {
            "flag": "-d",
            "long": "--download-only",
            "arg": null,
            "description": "Download only; package files are only retrieved, not unpacked or installed. Configuration Item: APT::Get::Download-Only."
        },
        {
            "flag": "-f",
            "long": "--fix-broken",
            "arg": null,
            "description": "Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken."
        },
        {
            "flag": "-m",
            "long": "--fix-missing",
            "arg": null,
            "description": "Ignore missing packages; if packages cannot be retrieved or fail the integrity check after retrieval (corrupted package files), hold back those packages and handle the result. Use of this option together with -f may produce an error in some situations. If a package is selected for installation (particularly if it is mentioned on the command line) and it could not be downloaded then it will be silently held back. Configuration Item: APT::Get::Fix-Missing."
        },
        {
            "flag": "",
            "long": "--no-download",
            "arg": null,
            "description": "Disables downloading of packages. This is best used with --ignore-missing to force APT to use only the .debs it has already downloaded. Configuration Item: APT::Get::Download."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Quiet; produces output suitable for logging, omitting progress indicators. More q's will produce more quiet up to a maximum of 2. You can also use -q=# to set the quiet level, overriding the configuration file. Note that quiet level 2 implies -y; you should never use -qq without a no-action modifier such as -d, --print-uris or -s as APT may decide to do something you did not expect. Configuration Item: quiet."
        },
        {
            "flag": "-s",
            "long": "--no-act",
            "arg": null,
            "description": "No action; perform a simulation of events that would occur based on the current system state but do not actually change the system. Locking will be disabled (Debug::NoLocking) so the system state could change while apt-get is running. Simulations can also be executed by non-root users which might not have read access to all apt configuration distorting the simulation. A notice expressing this warning is also shown by default for non-root users (APT::Get::Show-User-Simulation-Note). Configuration Item: APT::Get::Simulate. Simulated runs print out a series of lines, each representing a dpkg operation: configure (Conf), remove (Remv) or unpack (Inst). Square brackets indicate broken packages, and empty square brackets indicate breaks that are of no consequence (rare)."
        },
        {
            "flag": "-y",
            "long": "--assume-yes",
            "arg": null,
            "description": "Automatic yes to prompts; assume \"yes\" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install an unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes."
        },
        {
            "flag": "",
            "long": "--assume-no",
            "arg": null,
            "description": "Automatic \"no\" to all prompts. Configuration Item: APT::Get::Assume-No."
        },
        {
            "flag": "",
            "long": "--no-show-upgraded",
            "arg": null,
            "description": "Do not show a list of all packages that are to be upgraded. Configuration Item: APT::Get::Show-Upgraded."
        },
        {
            "flag": "-V",
            "long": "--verbose-versions",
            "arg": null,
            "description": "Show full versions for upgraded and installed packages. Configuration Item: APT::Get::Show-Versions."
        },
        {
            "flag": "-a",
            "long": "--host-architecture",
            "arg": null,
            "description": "This option controls the architecture packages are built for by apt-get source --compile and how cross-builddependencies are satisfied. By default is it not set which means that the host architecture is the same as the build architecture (which is defined by APT::Architecture). Configuration Item: APT::Get::Host-Architecture."
        },
        {
            "flag": "-P",
            "long": "--build-profiles",
            "arg": null,
            "description": "This option controls the activated build profiles for which a source package is built by apt-get source --compile and how build dependencies are satisfied. By default no build profile is active. More than one build profile can be activated at a time by concatenating them with a comma. Configuration Item: APT::Build-Profiles."
        },
        {
            "flag": "-b",
            "long": "--build",
            "arg": null,
            "description": "Compile source packages after downloading them. Configuration Item: APT::Get::Compile."
        },
        {
            "flag": "",
            "long": "--ignore-hold",
            "arg": null,
            "description": "Ignore package holds; this causes apt-get to ignore a hold placed on a package. This may be useful in conjunction with dist-upgrade to override a large number of undesired holds. Configuration Item: APT::Ignore-Hold."
        },
        {
            "flag": "",
            "long": "--with-new-pkgs",
            "arg": null,
            "description": "Allow installing new packages when used in conjunction with upgrade. This is useful if the update of an installed package requires new dependencies to be installed. Instead of holding the package back upgrade will upgrade the package and install the new dependencies. Note that upgrade with this option will never remove packages, only allow adding new ones. Configuration Item: APT::Get::Upgrade-Allow-New."
        },
        {
            "flag": "",
            "long": "--no-upgrade",
            "arg": null,
            "description": "Do not upgrade packages; when used in conjunction with install, no-upgrade will prevent packages on the command line from being upgraded if they are already installed. Configuration Item: APT::Get::Upgrade."
        },
        {
            "flag": "",
            "long": "--only-upgrade",
            "arg": null,
            "description": "Do not install new packages; when used in conjunction with install, only-upgrade will install upgrades for already installed packages only and ignore requests to install new packages. Configuration Item: APT::Get::Only-Upgrade."
        },
        {
            "flag": "",
            "long": "--allow-downgrades",
            "arg": null,
            "description": "This is a dangerous option that will cause apt to continue without prompting if it is doing downgrades. It should not be used except in very special situations. Using it can potentially destroy your system! Configuration Item: APT::Get::allow-downgrades. Introduced in APT 1.1."
        },
        {
            "flag": "",
            "long": "--allow-remove-essential",
            "arg": null,
            "description": "Force yes; this is a dangerous option that will cause apt to continue without prompting if it is removing essentials. It should not be used except in very special situations. Using it can potentially destroy your system! Configuration Item: APT::Get::allow-remove-essential. Introduced in APT 1.1."
        },
        {
            "flag": "",
            "long": "--allow-change-held-packages",
            "arg": null,
            "description": "Force yes; this is a dangerous option that will cause apt to continue without prompting if it is changing held packages. It should not be used except in very special situations. Using it can potentially destroy your system! Configuration Item: APT::Get::allow-change-held-packages. Introduced in APT 1.1."
        },
        {
            "flag": "",
            "long": "--force-yes",
            "arg": null,
            "description": "Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It should not be used except in very special situations. Using force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes. This is deprecated and replaced by --allow-unauthenticated , --allow-downgrades , --allow-remove-essential , --allow-change-held-packages in 1.1."
        },
        {
            "flag": "",
            "long": "--print-uris",
            "arg": null,
            "description": "Instead of fetching the files to install their URIs are printed. Each URI will have the path, the destination file name, the size and the expected MD5 hash. Note that the file name to write to will not always match the file name on the remote site! This also works with the source and update commands. When used with the update command the MD5 and size are not included, and it is up to the user to decompress any compressed files. Configuration Item: APT::Get::Print-URIs."
        },
        {
            "flag": "",
            "long": "--purge",
            "arg": null,
            "description": "Use purge instead of remove for anything that would be removed. An asterisk (\"*\") will be displayed next to packages which are scheduled to be purged. remove --purge is equivalent to the purge command. Configuration Item: APT::Get::Purge."
        },
        {
            "flag": "",
            "long": "--reinstall",
            "arg": null,
            "description": "Re-install packages that are already installed and at the newest version. Configuration Item: APT::Get::ReInstall."
        },
        {
            "flag": "",
            "long": "--list-cleanup",
            "arg": null,
            "description": "This option is on by default; use --no-list-cleanup to turn it off. When it is on, apt-get will automatically manage the contents of /var/lib/apt/lists to ensure that obsolete files are erased. The only reason to turn it off is if you frequently change your sources list. Configuration Item: APT::Get::List-Cleanup."
        },
        {
            "flag": "-S",
            "long": "--snapshot",
            "arg": null,
            "description": "This option controls the snapshot chosen for archives with Snapshot: enable in the source entry. For example, -S 20220102T030405Z selects a snapshot from January 2nd, 2022 at 03:04:05 UTC. Configuration Item: APT::Snapshot; see also the sources.list(5) manual page."
        },
        {
            "flag": "-t",
            "long": "--default-release",
            "arg": null,
            "description": "This option controls the default input to the policy engine; it creates a default pin at priority 990 using the specified release string. This overrides the general settings in /etc/apt/preferences. Specifically pinned packages are not affected by the value of this option. In short, this option lets you have simple control over which distribution packages will be retrieved from. Some common examples might be -t '2.1*', -t unstable or -t sid. Configuration Item: APT::Default-Release; see also the aptpreferences(5) manual page."
        },
        {
            "flag": "",
            "long": "--trivial-only",
            "arg": null,
            "description": "Only perform operations that are 'trivial'. Logically this can be considered related to --assume-yes; where --assume-yes will answer yes to any prompt, --trivial-only will answer no. Configuration Item: APT::Get::Trivial-Only."
        },
        {
            "flag": "",
            "long": "--mark-auto",
            "arg": null,
            "description": "After successful installation, mark all freshly installed packages as automatically installed, which will cause each of the packages to be removed when no more manually installed packages depend on this package. This is equally to running apt-mark auto for all installed packages. Configuration Item: APT::Get::Mark-Auto."
        },
        {
            "flag": "",
            "long": "--no-remove",
            "arg": null,
            "description": "If any packages are to be removed apt-get immediately aborts without prompting. Configuration Item: APT::Get::Remove. --auto-remove, --autoremove If the command is either install or remove, then this option acts like running the autoremove command, removing unused dependency packages. Configuration Item: APT::Get::AutomaticRemove."
        },
        {
            "flag": "",
            "long": "--only-source",
            "arg": null,
            "description": "Only has meaning for the source and build-dep commands. Indicates that the given source names are not to be mapped through the binary table. This means that if this option is specified, these commands will only accept source package names as arguments, rather than accepting binary package names and looking up the corresponding source package. Configuration Item: APT::Get::Only-Source. --diff-only, --dsc-only, --tar-only Download only the diff, dsc, or tar file of a source archive. Configuration Item: APT::Get::Diff-Only, APT::Get::Dsc-Only, and APT::Get::Tar-Only."
        },
        {
            "flag": "",
            "long": "--arch-only",
            "arg": null,
            "description": "Only process architecture-dependent build-dependencies. Configuration Item: APT::Get::Arch-Only."
        },
        {
            "flag": "",
            "long": "--indep-only",
            "arg": null,
            "description": "Only process architecture-independent build-dependencies. Configuration Item: APT::Get::Indep-Only."
        },
        {
            "flag": "",
            "long": "--allow-unauthenticated",
            "arg": null,
            "description": "Ignore if packages can't be authenticated and don't prompt about it. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn't ensured in another way by the user itself. The usage of the Trusted option for sources.list(5) entries should usually be preferred over this global override. Configuration Item: APT::Get::AllowUnauthenticated."
        },
        {
            "flag": "",
            "long": "--no-allow-insecure-repositories",
            "arg": null,
            "description": "Forbid the update command to acquire unverifiable data from configured sources. APT will fail at the update command for repositories without valid cryptographically signatures. See also apt-secure(8) for details on the concept and the implications. Configuration Item: Acquire::AllowInsecureRepositories."
        },
        {
            "flag": "",
            "long": "--allow-releaseinfo-change",
            "arg": null,
            "description": "Allow the update command to continue downloading data from a repository which changed its information of the release contained in the repository indicating e.g a new major release. APT will fail at the update command for such repositories until the change is confirmed to ensure the user is prepared for the change. See also apt-secure(8) for details on the concept and configuration. Specialist options (--allow-releaseinfo-change-field) exist to allow changes only for certain fields like origin, label, codename, suite, version and defaultpin. See also aptpreferences(5). Configuration Item: Acquire::AllowReleaseInfoChange."
        },
        {
            "flag": "",
            "long": "--show-progress",
            "arg": null,
            "description": "Show user friendly progress information in the terminal window when packages are installed, upgraded or removed. For a machine parsable version of this data see README.progress-reporting in the apt doc directory. Configuration Items: Dpkg::Progress and Dpkg::Progress-Fancy. --with-source filename Adds the given file as a source for metadata. Can be repeated to add multiple files. See --with-source description in apt-cache(8) for further details."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "Fail the update command if any error occured, even a transient one."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Show a short usage summary."
        },
        {
            "flag": "-v",
            "long": "--version",
            "arg": null,
            "description": "Show the program version."
        },
        {
            "flag": "-c",
            "long": "--config-file",
            "arg": null,
            "description": "Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the APTCONFIG environment variable. See apt.conf(5) for syntax information."
        },
        {
            "flag": "-o",
            "long": "--option",
            "arg": null,
            "description": "Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "apt-cache",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apt-cache/8/json"
        },
        {
            "name": "apt-cdrom",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apt-cdrom/8/json"
        },
        {
            "name": "dpkg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dpkg/1/json"
        },
        {
            "name": "sources.list",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/sources.list/5/json"
        },
        {
            "name": "apt.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/apt.conf/5/json"
        },
        {
            "name": "apt-config",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apt-config/8/json"
        },
        {
            "name": "secure",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/secure/8/json"
        },
        {
            "name": "aptpreferences",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/aptpreferences/5/json"
        }
    ]
}