| 1. | APT bug page |
NAME
apt-get - APT package handling utility -- command-line interface
SYNOPSIS
apt-get [-sqdyfmubV] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] {update | upgrade | dselect-upgrade | dist-upgrade | install pkg [{=pkg_version_number | /target_release}]... | remove pkg... | purge pkg... | source pkg [{=pkg_version_number | /target_release}]... | build-dep pkg [{=pkg_version_number | /target_release}]... | download pkg [{=pkg_version_number | /target_release}]... | check | clean | autoclean | autoremove | {-v | --version} | {-h | --help}}
DESCRIPTION
apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several "front-end" interfaces exist, such as aptitude(8), synaptic(8) and wajig(1).
Unless the -h, or --help option is given, one of the commands below must be present.
update
upgrade
When a package is supplied as an argument, the package will be installed prior to the upgrade action.
dist-upgrade
When a package is supplied as an argument, the package will be installed prior to the upgrade action.
dselect-upgrade
install
A specific version of a package can be selected for installation by following the package name with an equals and the version of the package to select. This will cause that version to be located and selected for install. Alternatively a specific distribution can be selected by following the package name with a slash and the version of the distribution or the Archive name (stable, testing, unstable).
Both of the version selection mechanisms can downgrade packages and must be used with care.
This is also the target to use if you want to upgrade one or more already-installed packages without upgrading every package you have on your system. Unlike the "upgrade" target, which installs the newest version of all currently installed packages, "install" will install the newest version of only the package(s) specified. Simply provide the name of the package(s) you wish to upgrade, and if a newer version is available, it (and its dependencies, as described above) will be downloaded and installed.
Finally, the apt_preferences(5) mechanism allows you to create an alternative installation policy for individual packages.
If no package matches the given expression and the expression contains one of '.', '?' or '*' then it is assumed to be a POSIX regular expression, and it is applied to all package names in the database. Any matches are then installed (or removed). Note that matching is done by substring so 'lo.*' matches 'how-lo' and 'lowest'. If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.
Fallback to regular expressions is deprecated in APT 2.0, has been removed in apt(8), except for anchored expressions, and will be removed from apt-get(8) in a future version. Use apt-patterns(7) instead.
reinstall
remove
purge
source
The arguments are interpreted as binary and source package names. See the --only-source option if you want to change that.
Source packages are tracked separately from binary packages via deb-src lines in the sources.list(5) file. This means that you will need to add such a line for each repository you want to get sources from; otherwise you will probably get either the wrong (too old/too new) source versions or none at all.
If the --compile option is specified then the package will be compiled to a binary .deb using dpkg-buildpackage for the architecture as defined by the --host-architecture option. If --download-only is specified then the source package will not be unpacked.
A specific source version can be retrieved by postfixing the source name with an equals and then the version to fetch, similar to the mechanism used for the package files. This enables exact matching of the source package name and version, implicitly enabling the APT::Get::Only-Source option.
Note that source packages are not installed and tracked in the dpkg database like binary packages; they are simply downloaded to the current directory, like source tarballs.
build-dep
The arguments are interpreted as binary or source package names. See the --only-source option if you want to change that.
satisfy
Example: apt-get satisfy "foo" "Conflicts: bar" "baz (>> 1.0) | bar (= 2.0), moo"
The legacy operator '</>' is not supported, use '<=/>=' instead.
check
download
clean
autoclean (and the auto-clean alias since 1.1)
distclean (and the dist-clean alias)
autoremove (and the auto-remove alias since 1.1)
autopurge
changelog
indextargets
OPTIONS
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations.
--no-install-recommends
--install-suggests
-d, --download-only
-f, --fix-broken
-m, --ignore-missing, --fix-missing
--no-download
-q, --quiet
-s, --simulate, --just-print, --dry-run, --recon, --no-act
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).
-y, --yes, --assume-yes
--assume-no
--no-show-upgraded
-V, --verbose-versions
--no-list-columns
--comment
-a, --host-architecture
-P, --build-profiles
-b, --compile, --build
--ignore-hold
--with-new-pkgs
--no-upgrade
--only-upgrade
--allow-downgrades
--allow-remove-essential
--allow-change-held-packages
--force-yes
--print-uris
--purge
--reinstall
--list-cleanup
-S, --snapshot
-t, --target-release, --default-release
--trivial-only
--mark-auto
--no-remove
--auto-remove, --autoremove
--only-source
--diff-only, --dsc-only, --tar-only
--arch-only
--indep-only
--allow-unauthenticated
--allow-insecure-repositories
--allow-releaseinfo-change
Specialist options (--allow-releaseinfo-change-field) exist to allow changes only for certain fields like origin, label, codename, suite, version and defaultpin. See also apt_preferences(5). Configuration Item: Acquire::AllowReleaseInfoChange.
--show-progress
--with-sourcefilename
-eany, --error-on=any
-U, --update
Caveat: Due to technical limitations, locks are acquired individually for each phase, hence an install may fail to acquire locks after successfully executing the update. Until this is resolved, this is merely syntactic sugar for apt update && apt install
-h, --help
-v, --version
--audit
-c, --config-file
-o, --option
--no-color, --color
FILES
/etc/apt/sources.list
/etc/apt/sources.list.d/
/etc/apt/apt.conf
/etc/apt/apt.conf.d/
/etc/apt/preferences
/etc/apt/preferences.d/
/var/cache/apt/archives/
/var/cache/apt/archives/partial/
/var/lib/apt/lists/
/var/lib/apt/lists/partial/
SEE ALSO
apt-cache(8), apt-cdrom(8), dpkg(1), sources.list(5), apt.conf(5), apt-patterns(7), apt-config(8), apt-secure(8), The APT User's guide in /usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto.
DIAGNOSTICS
apt-get returns zero on normal operation, decimal 100 on error.
BUGS
APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
AUTHORS
Jason Gunthorpe
APT team
NOTES
- 1.
APT bug page