1APT(8) APT APT(8)
2
3
4
6 apt - command-line interface
7
9 apt [-h] [-o=config_string] [-c=config_file] [-t=target_release]
10 [-a=architecture] {list | search | show | update |
11 install pkg [{=pkg_version_number | /target_release}]... |
12 remove pkg... | upgrade | full-upgrade | edit-sources |
13 {-v | --version} | {-h | --help}}
14
16 apt provides a high-level commandline interface for the package
17 management system. It is intended as an end user interface and enables
18 some options better suited for interactive usage by default compared to
19 more specialized APT tools like apt-get(8) and apt-cache(8).
20
21 Much like apt itself, its manpage is intended as an end user interface
22 and as such only mentions the most used commands and options partly to
23 not duplicate information in multiple places and partly to avoid
24 overwhelming readers with a cornucopia of options and details.
25
26 update (apt-get(8))
27 update is used to download package information from all configured
28 sources. Other commands operate on this data to e.g. perform
29 package upgrades or search in and display details about all
30 packages available for installation.
31
32 upgrade (apt-get(8))
33 upgrade is used to install available upgrades of all packages
34 currently installed on the system from the sources configured via
35 sources.list(5). New packages will be installed if required to
36 satisfy dependencies, but existing packages will never be removed.
37 If an upgrade for a package requires the removal of an installed
38 package the upgrade for this package isn't performed.
39
40 full-upgrade (apt-get(8))
41 full-upgrade performs the function of upgrade but will remove
42 currently installed packages if this is needed to upgrade the
43 system as a whole.
44
45 install, reinstall, remove, purge (apt-get(8))
46 Performs the requested action on one or more packages specified via
47 regex(7), glob(7) or exact match. The requested action can be
48 overridden for specific packages by appending a plus (+) to the
49 package name to install this package or a minus (-) to remove it.
50
51 A specific version of a package can be selected for installation by
52 following the package name with an equals (=) and the version of
53 the package to select. Alternatively the version from a specific
54 release can be selected by following the package name with a
55 forward slash (/) and codename (bullseye, bookworm, sid ...) or
56 suite name (stable, testing, unstable). This will also select
57 versions from this release for dependencies of this package if
58 needed to satisfy the request.
59
60 Removing a package removes all packaged data, but leaves usually
61 small (modified) user configuration files behind, in case the
62 remove was an accident. Just issuing an installation request for
63 the accidentally removed package will restore its function as
64 before in that case. On the other hand you can get rid of these
65 leftovers by calling purge even on already removed packages. Note
66 that this does not affect any data or configuration stored in your
67 home directory.
68
69 autoremove (apt-get(8))
70 autoremove is used to remove packages that were automatically
71 installed to satisfy dependencies for other packages and are now no
72 longer needed as dependencies changed or the package(s) needing
73 them were removed in the meantime.
74
75 You should check that the list does not include applications you
76 have grown to like even though they were once installed just as a
77 dependency of another package. You can mark such a package as
78 manually installed by using apt-mark(8). Packages which you have
79 installed explicitly via install are also never proposed for
80 automatic removal.
81
82 satisfy (apt-get(8))
83 satisfy satisfies dependency strings, as used in Build-Depends. It
84 also handles conflicts, by prefixing an argument with "Conflicts:
85 ".
86
87 Example: apt satisfy "foo, bar (>= 1.0)" "Conflicts: baz, fuzz"
88
89 search (apt-cache(8))
90 search can be used to search for the given regex(7) term(s) in the
91 list of available packages and display matches. This can e.g. be
92 useful if you are looking for packages having a specific feature.
93 If you are looking for a package including a specific file try apt-
94 file(1).
95
96 show (apt-cache(8))
97 Show information about the given package(s) including its
98 dependencies, installation and download size, sources the package
99 is available from, the description of the packages content and much
100 more. It can e.g. be helpful to look at this information before
101 allowing apt(8) to remove a package or while searching for new
102 packages to install.
103
104 list
105 list is somewhat similar to dpkg-query --list in that it can
106 display a list of packages satisfying certain criteria. It supports
107 glob(7) patterns for matching package names as well as options to
108 list installed (--installed), upgradeable (--upgradeable) or all
109 available (--all-versions) versions.
110
111 edit-sources (work-in-progress)
112 edit-sources lets you edit your sources.list(5) files in your
113 preferred text editor while also providing basic sanity checks.
114
116 The apt(8) commandline is designed as an end-user tool and it may
117 change behavior between versions. While it tries not to break backward
118 compatibility this is not guaranteed either if a change seems
119 beneficial for interactive use.
120
121 All features of apt(8) are available in dedicated APT tools like apt-
122 get(8) and apt-cache(8) as well. apt(8) just changes the default value
123 of some options (see apt.conf(5) and specifically the Binary scope). So
124 you should prefer using these commands (potentially with some
125 additional options enabled) in your scripts as they keep backward
126 compatibility as much as possible.
127
129 apt-get(8), apt-cache(8), sources.list(5), apt.conf(5), apt-config(8),
130 The APT User's guide in /usr/share/doc/apt-doc/, apt_preferences(5),
131 the APT Howto.
132
134 apt returns zero on normal operation, decimal 100 on error.
135
137 APT bug page[1]. If you wish to report a bug in APT, please see
138 /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
139
141 APT team
142
144 1. APT bug page
145 http://bugs.debian.org/src:apt
146
147
148
149APT 2.4.5 05 April 2020 APT(8)