# What are all the apt command-line commands and options?

I know they think that they are being helpful, but in fact they are being quite the opposite here in the apt --help and manpage:

Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details.

So basically in other words they only list a few of the commands and options and give you no idea about how to find out the rest which is greatly unhelpful if I am to use this tool.

So what are all the commands and options that they feel they are being 'helpful' not to provide, what are their details and usage, and how can I keep up-to-date with this information if they do not provide it officially? Or perhaps that has changed now and they are listed somewhere?

I am running Ubuntu GNOME 16.04 with GNOME 3.20.

• Broad questions like these aren't very suitable for AskUbuntu like sites as was mentioned in the FAQ and thus I'm voting this to close – Anwar Aug 16 '16 at 11:14
• @AnwarShah: I know what it says, but I'm not sure that this is actually the case for this question, I know some of the wording is similar to what they would categorise as 'too broad', however I am asking a very specific and reasonable question, which may have a relatively short answer depending on how many commands there are. Probably the most helpful thing to be provided would be a link to official documentation with the information if there is in fact such documentation anywhere. – user364819 Aug 16 '16 at 13:33
• and that will make this question's answers copy of man pages. because apt is apt-get and apt-cache only. – Anwar Aug 16 '16 at 13:48

apt changelog PACKAGE_NAME


The above cmd. hows the changelog history for the specified package in reverse date order (newest first) in less format, pulled from changelogs.ubuntu.com

apt full-upgrade


(requires root privilege) a new name for apt-get dist-upgrade - see man apt-get:

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages.

apt search PACKAGE_NAME


Almost the same as apt-cache search but with prettified output - line-spaced and coloured for easier reading:

search performs a full text search on all available package lists for the POSIX regex pattern given. It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description, including virtual package names.

From the apt(8) manual page:

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 this is not guaranteed either if a change seems beneficial
for interactive use.

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.


My understanding of what this means is that apt is to be used with the options shown in the man page and other apt tools such as apt-get(8) or apt-cache(8) have additional options and functionality available to the end user.

• Perhaps this should be added as comment rather than answer as it is too obvious – rancho Aug 15 '16 at 22:58
• No, apt is not a shortcut to apt-get; they are two separate programs, even if they are closely related. But several of the options provided by man apt-get do apply to apt as well, even if there are differences. For instance, apt upgrade and apt-get upgrade are similar but not identical. – Gunnar Hjalmarsson Aug 15 '16 at 23:15
• Thanks, @GunnarHjalmarsson. I edited my answer to clarify the wording. – Antonios Hadjigeorgalis Aug 15 '16 at 23:55
• Do you have a reference for this? I had always thought that apt is either a superset of apt-get or that it, at least, has some options that apt-get doesn't even if it lacks some that apt-get has. What makes you think is it s subset only? – terdon Aug 16 '16 at 10:38
• @terdon, Comparing the man pages, I saw nothing listed for apt that isn't also available from apt-get. And there are many additional options for apt-get. – Antonios Hadjigeorgalis Aug 16 '16 at 12:05