APT(8)

๐Ÿ’– apt(8) โ€” your girl's guide to the package manager, no cap โœจ

okay so bestie, real talk: this is the manual page for apt, like, the main character of Debian package management?? and yes she's serving you the whole thing, every flag, every caveat, nothing skipped. you're welcome ๐Ÿ’… (also hi, this is apt(8) in case the header wasn't obvious ๐ŸŽ€)


โœจ SYNOPSIS โœจ

apt [-h] [-o=config_string] [-c=config_file] [-t=target_release]
    [-a=architecture] {list | search | show | update |
    install pkg [{=pkg_version_number | /target_release}]...  |
    remove pkg...  | upgrade | full-upgrade | edit-sources |
    {-v | --version} | {-h | --help}}

like, that's the whole mood board right there ๐Ÿฆ‹


๐ŸŒธ DESCRIPTION ๐ŸŒธ

apt gives you a high-level commandline interface for the package management system. she's literally built as an end user interface, and she turns on some options by default that are way better suited for interactive usage than what the more specialized APT tools like apt-get(8) and apt-cache(8) do. periodt. ๐Ÿ‘‘

Much like apt herself, this very manpage is intended as an end user interface โ€” so it only mentions the most used commands and options, partly so we don't duplicate info all over the place, and partly so we don't overwhelm you with a cornucopia of options and details. it's giving "curated", not "incomplete" ๐Ÿ’–

update (apt-get(8))

update is used to download package information from all configured sources. other commands operate on this data to e.g. perform package upgrades or search in and display details about all packages available for installation. it's the vibe check before the main event โœจ

upgrade (apt-get(8))

upgrade installs the available upgrades of all packages currently installed on the system, from the sources configured via sources.list(5). new packages will be installed if required to satisfy dependencies, but existing packages will never be removed. so if an upgrade for a package requires removing an installed package โ€” sorry bestie, the upgrade for that package just isn't performed ๐Ÿ˜ญ

When a package is supplied as an argument, the package will be installed prior to the upgrade action.

full-upgrade (apt-get(8))

full-upgrade does everything upgrade does, but she will remove currently installed packages if that's needed to upgrade the system as a whole. she's the "no thoughts, just results" one ๐Ÿ”ฅ

When a package is supplied as an argument, the package will be installed prior to the upgrade action.

install, reinstall, remove, purge (apt-get(8))

Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match. and you can override the requested action for specific packages by appending a plus (+) to the package name to install that package, or a minus (-) to remove it. tiny little symbols, huge amount of power ๐Ÿซถ

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. Alternatively the version from a specific release can be selected by following the package name with a forward slash (/) and codename (trixie, forky, sid ...) or suite name (stable, testing, unstable). This will also select versions from this release for dependencies of this package if needed to satisfy the request. iykyk ๐Ÿ’…

Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind โ€” in case the remove was an accident ๐Ÿฅบ. Just issuing an installation request for the accidentally removed package will restore its function as before in that case. On the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration stored in your home directory. your dotfiles are safe, queen ๐ŸŽ€

autoremove (apt-get(8))

autoremove removes packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed โ€” because dependencies changed, or the package(s) needing them were removed in the meantime. she's the cleanup fairy ๐Ÿงš

bestie, please check that the list does not include applications you have grown to like even though they were once installed just as a dependency of another package ๐Ÿ˜ญ you can mark such a package as manually installed by using apt-mark(8). Packages which you have installed explicitly via install are also never proposed for automatic removal. good.

satisfy (apt-get(8))

satisfy satisfies dependency strings, as used in Build-Depends. It also handles conflicts, by prefixing an argument with "Conflicts: ".

Example: apt satisfy "foo, bar (>= 1.0)" "Conflicts: baz, fuzz"

why, why-not

These commands print the reasoning path from the solver. They're similar to the equivalent aptitude commands for many use cases, but different in that they print the actual reason the solver picked rather than the potential strongest path. receipts, not speculation ๐Ÿ”

The why command determines why an installed package is installed. This provides reasonable feedback as to why an automatically installed package is installed; for a manually installed package no other reason is given. If the package is not installed, no reason can be determined.

The why-not command determines why a package was determined to not be installable. This may not always yield a result, even if a package is uninstallable. sometimes the solver just doesn't want to talk about it ๐Ÿ’€

Both commands take a single argument, the name of a package.

search (apt-cache(8))

search can be used to search for the given regex(7) term(s) in the list of available packages and display matches. This can e.g. be useful if you're looking for packages having a specific feature. If you're looking for a package including a specific file try apt-file(1) instead. ๐Ÿ”Ž

show (apt-cache(8))

Show information about the given package(s) including its dependencies, installation and download size, sources the package is available from, the description of the packages content and much more. It can e.g. be helpful to look at this information before allowing apt(8) to remove a package or while searching for new packages to install. always read before you delete, bestie ๐Ÿ™ˆ

list

list is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. It supports glob(7) patterns for matching package names, apt-patterns(7), as well as options to list installed (--installed), upgradeable (--upgradeable) or all available (--all-versions) versions. pick your filter, she'll serve the list ๐Ÿ‘‘

edit-sources (work-in-progress)

edit-sources lets you edit your sources.list(5) files in your preferred text editor while also providing basic sanity checks. she holds your hand a lil bit ๐Ÿซถ (also: work-in-progress, so be nice to her)

showsrc, depends, rdepends, policy (summarised in apt-cache(8))

source, build-dep, download, changelog, clean, distclean, autoclean (summarised in apt-get(8))


๐Ÿฆ‹ SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS ๐Ÿฆ‹

The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility, that's not guaranteed either if a change seems beneficial for interactive use. she's a free spirit, okay?? ๐ŸŒˆ

All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well. apt(8) just changes the default value of some options (see apt.conf(5) and specifically the Binary scope).

So you should prefer using these commands (potentially with some additional options enabled) in your scripts, as they keep backward compatibility as much as possible. scripts need stability, not vibes. fr fr ๐Ÿ’ฏ

๐Ÿ’… OPTIONS ๐Ÿ’…

All command line options may be set using the configuration file, and 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. yes, several. she's flexible like that โœจ

  • -h, --help โ€” Show a short usage summary. the "help me help you" button ๐Ÿฅบ
  • -v, --version โ€” Show the program version.
  • --audit โ€” Show audit (and notice) messages. This overrides the quiet option, but only for notice messages, not progress ones. selective hearing, but make it config ๐Ÿ’€
  • -c, --config-file โ€” 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 APT_CONFIG environment variable. See apt.conf(5) for syntax information.
  • -o, --option โ€” 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. stack 'em, bestie ๐Ÿ“
  • --cli-version โ€” Requests a specific CLI version. This is a pattern that takes a MAJOR.MINOR version. You may omit the MINOR version, in which case the latest supported minor level will be used.

Version tracks are presented as follows: The version 3.2 has equivalent versions 0.32, 1.22, and 2.12, implementing new features for their specified major versions.

A special case is the X.9 version pattern: A version like 2.9 is followed by 3.0, but 2.10 follows directly on 2.8; given that we use odd version numbers as development series (2.9 is the 3.0 development series).

This feature has been introduced in APT 3.1.10, and replaces the binary-specific configuration. You may use the APT::Version to similar effect on older binaries, for example, use -o APT::Version=2 to make apt(8) behave like the 2.x series.

The default value is the current APT version for apt(8) and 0.(10 * major + minor) for the classic commands. The 0.X series is soft-deprecated and the other commands will roll over to the 2.x series in the future. ๐Ÿ‘€ noted.

  • --no-color, --color โ€” Turn colors on or off. Colors are on by default on supported terminals for apt(8) and can also be disabled using the NO_COLOR or APT_NO_COLOR environment variables, or further configured by the APT::Color configuration option and scope โ€” see apt.conf(5) for information on that. aesthetic = configurable ๐ŸŒธ

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

apt-get(8), apt-cache(8), sources.list(5), apt.conf(5), apt-config(8), apt-patterns(7), The APT User's guide in /usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto. the whole friend group, honestly ๐Ÿซถ


โญ DIAGNOSTICS โญ

apt returns zero on normal operation, decimal 100 on error. that's it, that's the whole mood chart ๐Ÿ’€


๐ŸŽ€ 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. found a glitch? tell the devs, don't just suffer in silence bestie ๐Ÿ˜ญ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

APT team โ€” legends, all of them ๐Ÿ’–


๐ŸŒŸ NOTES ๐ŸŒŸ

  1. APT bug page https://bugs.debian.org/src:apt

and that's the whole page, you ate that ๐Ÿ“โœจ this was APT 3.3.5, dated 07 November 2025 โ€” go forth and apt install responsibly, mwah ๐Ÿ’‹๐ŸŒˆ

๐Ÿ“ฆ where this page comes from