Friends using Ubuntu must have encountered a command called apt-get. Using this tool to install various applications is quite enjoyable. After the release of Ubuntu 16.04, apt began to be used more frequently.
So, what exactly is the difference between apt-get and apt commands?
If they have similar command structures, why is there a need for the new apt command?
Is apt really better than apt-get?
Should ordinary users use the new apt command or stick to the old habit of continuing to use apt-get?
Teacher Peng will explain all these questions in this article, and we hope that by the end, you will have a clearer understanding.
1. Concepts
1. Apt-get
Advanced Package Tool, also known as apt-get, is an application manager for Unix and Linux systems.
Originally released in 1998, it was used to retrieve applications and load them onto Debian Linux systems. It is mainly used to automatically search, install, upgrade, or uninstall software or operating systems from the internet software repositories.
One reason apt-get became famous is its excellent ability to solve software dependencies. It typically uses .deb-formatted files but can also handle Red Hat’s Package Manager (RPM) files through modifications.
Apt-get is widely used in the Linux community and has become an important tool for managing desktops, laptops, and networks. As Linux becomes more prevalent in enterprises, Windows and Mac users benefit from understanding how to use apt-get to load applications.
Additionally, with the rise of microcontroller devices like Raspberry Pi, apt-get is a convenient way to load applications on these platforms. If the application you want to load requires libraries or another application to function properly, apt-get will help you find and load the necessary libraries or application code.
The current stable version of apt-get is 1.0.9.2, released in October 2014.
Mainstream Linux systems using apt-get include Debian and its variants of Ubuntu. In most cases, this tool is run from the command line. Several graphical front-ends are available, including Synaptic Package Manager, Ubuntu Software Center, Aptitude, and Kpackage.
Users of Raspberry Pi and Beaglebone Black nanoLinux versions can easily use apt-get to load programs, as these systems typically come from Ubuntu or Debian code. It is the package management tool for Debian and Ubuntu distributions, very similar to the yum tool in Red Hat.
Apt-get commands generally require root privileges to execute, so they are usually preceded by the sudo command.
2. Apt
The apt command-line utility was launched in 2014 with its first stable version for installing .deb software packages on Debian distributions. It was initially used in unstable Debian versions and became standard in Debian 8.
After the release of Ubuntu 16.04, apt began to gain popularity and somewhat replaced apt-get.
As the apt install package command’s usage frequency gradually surpassed that of apt-get install package, more and more other Linux distributions began to follow Ubuntu’s lead and encourage users to use apt instead of apt-get.
Most people do not understand the differences between apt and apt-get and often feel confused when using one or the other.
Both are open-source command-line tools used for managing software packages, such as installing, updating, upgrading, and deleting.
However, there are still some differences between them.
Let’s look at some apt commands that replace apt-get. To see these commands, you can type apt help or access the apt man page by typing apt man in the terminal. It will display all information related to apt.

2. Differences Between apt-get and apt
The first difference between apt and apt-get is the commands themselves. For example, to update the system repository index using apt-get, you can run:
#apt-get update

To use apt, you would enter the command:
#apt update

The apt update command not only updates the repository index but also informs about available software in the repository and how many new versions are available.
1. Command Comparison
apt-get | apt | Function |
---|---|---|
apt-get | apt | Install packages |
apt-get remove | apt remove | Remove packages |
apt-get remove | apt remove | Replace all packages |
apt-get purge | apt purge | Remove packages and configuration files |
apt-get upgrade | apt upgrade | Update all packages (automatically handles dependencies) |
apt-get autoremove | apt autoremove | Automatically remove unnecessary packages |
apt-get dist-upgrade | apt full-upgrade | Automatically handle dependencies while upgrading packages |
apt-cache search | apt search | Search applications |
apt-cache show | apt show | Display installation details |
-
Remove unnecessary dependencies: apt-get autoremove and apt autoremove remove packages with related configurations.
-
In the above table, if apt-get is replaced with apt, all commands remain the same, except for the apt upgrade command. The old apt-get upgrade command updates all packages currently present in the system; it does not install or remove existing packages. The new apt upgrade command will install packages added as dependencies for upgradeable packages. Although similar to apt-get upgrade, it will also not remove previously installed packages.
-
The apt show command prints output in alphabetical order and hides less important information displayed by the apt-cache show command.
-
The differences between apt and apt-get are not limited to commands; the new apt command has added another visual feature to satisfy end-users. Whenever updating packages using apt upgrade, apt full-upgrade, or apt dist-upgrade, a progress bar is displayed to notify the progress of the process.

-
When using apt remove or apt purge to remove packages, it will also appear.
-
Moreover, if we run apt list –upgradeable, it will also show some colors to provide a clear overview of which packages in the repository offer the latest versions.

2. Two New Commands
In addition to replacing commands, apt introduced two new commands:
New apt Commands | Function |
---|---|
apt list | List packages based on conditions (installed, upgradeable, etc.) |
apt edit-sources | Edit source list |
-
apt list – When the apt list command is used with –installed or –upgradeable, it will list installed, installable, or packages needing upgrade. -
apt edit-sources – Using this command will open the sources.list file in an editor for editing. apt-get will not be completely replaced by apt, and I don’t think it will ever be fully deprecated. You might be wondering which one to choose: apt or apt-get. In my opinion, choosing apt is worthwhile, as it provides all necessary functions for package management and is faster, friendlier, and easier to use.
3. Should I Use apt or apt-get?
Currently, no Linux distribution has officially announced that apt-get will be deprecated; at least it still has more and finer operation functions than apt. For low-level operations, apt-get is still needed.
Since both commands are useful, should I use apt or apt-get?
As a regular Linux user, system geeks recommend that everyone adapt and start using apt first. Not only because many Linux distributors recommend apt, but mainly because it provides the necessary options for Linux package management.
Most importantly, the apt command options are fewer and easier to remember, making it more user-friendly, so there is no reason to stick to apt-get.
Finally, I would like to offer everyone two usage suggestions:
-
apt can be seen as a subset of apt-get and apt-cache commands, providing necessary command options for package management. -
Although apt-get has not been deprecated, ordinary users should still use apt first.
Liang Xu’s Personal WeChat
Add Liang Xu’s Personal WeChat to receive three sets of essential reading materials for programmers
→ Selected technical materials sharing
→ Community for exchanging ideas with experts
Recommended reading:
17 Practical Tips You Must Master in Linux Operations
So Real! The Programmer’s Hierarchy of Disdain…
To Linux Operations: When Your Server is Hacked, Make Sure to Check if You Made These 5 Mistakes
5T Technical Resources Giveaway! Including but not limited to: C/C++, Linux, Python, Java, PHP, Artificial Intelligence, Microcontrollers, Raspberry Pi, etc. Reply with “1024” in the public account to get it for free!!