Last Updated on 2022-04-16 by Clay
Almost all of user who used Debian/Ubuntu OS use apt or apt-get tool to control their own packages. Many users even misunderstand that they are the same thing.
But, come on, the different command-names already suggest everything.
In fact, apt and apt-get is different. apt-get is older but it is the top choice for management packages; apt was only used in the unstable version of Debian at first, and then became the standard version in Debian 8. It is gradually gain popularity and replaced apt-get until Ubuntu 16.04.
So specifically, what is the difference between these two instructions?
Differences Between Commands
| Function | apt | apt-get |
|---|---|---|
| Installation | apt install | apt-get install |
| Remove | apt remove | apt-get remove |
| Update | apt update | apt-get update |
| Upgrade all packages | apt upgrade | apt-get upgrade |
| Upgrade all packages (include dependencies) | apt full-upgrade | apt-get dist-upgrade |
| Search package | apt search | apt-cache search |
| Show package info | apt show | apt-cache show |
| Remove the dependencies we do not need | apt autoremove | apt-get autoremove |
| Remove the useless configuration | apt purge | apt-get purge |
As you can see, most of the instructions are actually very similar, but personally, I feel that the apt command is better to remember.
Other Differences
According to https://linuxhint.com/diff_apt_vs_aptget/, apt more humanely adds a progress bar in the installation and removing, so that we can know current processing speed.
It is nice.
Not only that, in some functions, the apt command will be displayed users can pay more attention to the key points in the message.
Conclusion
Although apt-get has not yet stepped down from the system-command-stage, most distributions recommend apt first.
As I said above, the apt command is more easy to remember and you don’t have to worry about when to switch from apt-cache to apt-config… it is just apt.
From the functional point to view, apt does not lack the necessary recommended that users use the apt command first.