Starting with Ubuntu 16.04, a notable new feature is the introduction of the apt command. In fact, the first stable release of APT was released in 2014, but with the release of Ubuntu 16.04, people started to notice it.

More and more people are using apt install package instead of apt-get install package, and slowly, many other distributions are following Ubuntu’s lead and encouraging users to use apt instead of apt-get.

You probably know the difference between apt and apt-get, but if there are similar commands, which one does the new command apt use? You might also be wondering is apt better than apt-get? Should you use the new command apt or stick with apt-get?

I will explain these questions in this article, and hope that reading this article will give you a clear picture.

Why was APT introduced?

Debian-based Linux distributions such as Ubuntu, Linux Mint, and Elementary OS have package management tools built in. Debian uses a set of package management tools called Advanced Packaging Tool (APT). Note that this is not to be confused with the apt command.

There are various tools available to interact with APT to install, remove, and manage debian-based Linux distribution packages. Apt-get is a widely used command line tool, another has both GUI and command line Aptitude.

There are many similar commands to apt-get, such as apt-cache. That’s the problem, these commands are so scattered that they are hard to understand and use by the average user who has never used Linux. The apt command was introduced to solve this problem. It contains the most widely used features of apt-get and apt-cache, and can manage apt.conf files.

The difference between apt and apt-get

Almost everything is available with APT, and its main purpose is to give users the easiest and most efficient way to use package management tools.

By default, APT enables some useful actions, such as displaying a progress bar during apt installation or deletion. You can also be reminded of the number of packages you can upgrade when updating the package list. These features are enabled by default, although they can also be implemented with apt-get.

The difference between apt and apt-get commands

Although apt has some commands similar to apt-get, apt is not backward compatible with apt-get. This means that it is impossible to completely replace apt-get with apt. Here I list which apt commands replace apt-get and apt-cache commands.

Apt command Superseded command instructions
apt install apt-get install Install the new package
apt remove apt-get remove Uninstalling installed packages (keeping configuration files)
apt purge apt-get purge Uninstalling installed packages (deleting configuration files)
apt update apt-get update Updating the Software Package List
apt upgrade apt-get upgrade Update all installed packages
apt autoremove apt-get autoremove Uninstall package dependencies that are no longer needed
apt full-upgrade apt-get dist-upgrade Automatic handling of dependent package upgrades
apt search apt-cache search Finding software packages
apt show apt-cache show Displays details about the specified software package

Apt also has some commands of its own.

New apt command instructions
apt list List packages that contain conditions (installed, upgradable, etc.)
apt edit-sources Edit the source list

Apt is evolving, so you may see more command lines in the future.

Apt-get has been deprecated

There is no information to suggest that apt-get has been deprecated, nor indeed should it be, as it has more functionality than APT. For some usage scenarios, such as scripting, you might also use apt-get.

Should I use apt or apt-get

As a normal Linux user, apt is preferred as a Linux distribution recommended command. It provides the necessary options for package management and, more importantly, easy memorization.

conclusion

I hope I can make clear the difference between APT and apt-get, and finally summarize the conclusion of APT and apt-get:

  • Apt is a subset of apt-get and apt-cache and provides the necessary commands for package management.
  • Although apt-get has not been deprecated, it is recommended to start using it frequently as an average Linux user.

Follow the public account “Zhanbai Saio” to get more valuable content.