Last updated on November 26th, 2022 at 03:22 pm
Starting with Ubuntu 16.04, the distribution has a new package manager, apt. It works in much the same way as apt-get, but it has a few differences, which we will discuss in this article. In fact, the first stable version of apt came out in 2014, but it didn’t get into widespread use until two years later.
You are probably wondering what is apt? This is the next version of apt-get. It has an almost identical command structure, but there are differences. But let’s first understand why the new package manager was released.
WHY DID APT APPEAR?
Previously, Ubuntu used the Debian distribution’s very powerful package management system. Its advantage is that it has a lot of functions that are useful for developers, but one drawback arises from this, these functions were spread over several executable files. Most of the features ordinary users do not use, and those that they use turned out to be divided into two utilities: apt-get and apt-cache.
Ubuntu strives for simplicity. The apt utility has been implemented to make it easier to work with the package manager and to combine several commands into one. The functionality of apt-get and apt-cache has been rewritten, and although the utility is now fully compatible with apt-get, its code is new.
Whether people want to admit it or not, apt-get is an obsolete tool and its practicality is highly questionable. The apt tool has been designed from the ground up to be even more efficient, and is designed to be enjoyable for new users.
APT VS APT-GET. WHAT ARE THE DIFFERENCES?
What to use, apt or apt-get? What is the difference between these two utilities? For starters, you no longer need to use apt-get autoremove to clear the package cache, the packages will be removed automatically. Also you don’t need to type apt-cache search to find packages.
These commands have been replaced by apt search and apt remove. The main difference between apt and apt-get is that it combines most of the apt-get and apt-cache commands . All functionality is now in one utility.
Although this is not the only difference from apt-get. Package installation progress bars have been improved here. Some additions are also supported that make the utility smarter than the previous one. For example, when updating software sources with apt-get, there is no easy way to list the packages available for updating. Here you can simply do:
sudo apt-get update
apt list --upgradable
Of course, little things, but nice. New, modern output colors have also been added, and overall package installation is faster. Canonical is in no hurry to move away from apt-get, but they will make it a positive change.
NEW APT COMMANDS
Here is a list of commands supported by apt, taken directly from the –help output. These commands are very similar to the implementation of apt-get and apt-cache, but are more organized and grouped.
- list – list of packages;
- search – search for packages by name;
- show – show detailed information about the package;
- update – update lists of available packages;
- install – install a package;
- remove – remove a package;
- upgrade – install available new package versions;
- full-upgrade – full system upgrade;
- edit-sources – edit the software sources file.
For more information, run man apt in a terminal. The information stored there will help you thoroughly study the new utility.
The apt-get utility is a tried and true part of the Debian package manager. This tool has been around for a long time and comes by default in many releases of Ubuntu and Debian. We have always used it when we needed to update something, update software, or even just clean the system of garbage.
However, it is getting old. The package manager no longer meets all the needs of users, and therefore it is slowly being replaced by apt. Ubuntu developers understand that they need to update their package manager to make it simpler, more elegant, and more secure. But while both utilities exist in the system, it is up to you to choose whether to use apt or apt-get. Will you be using the new package manager? Or are you already using it?