The advanced package manager tool 1.0 has been released with a new ‘apt’ binary application that combines commands from apt-get and apt-cache command-line utilities.
The apt binary currently supports the following commands:
- list: which is similar to dpkg list and can be used with flags like
- –installed or –upgradable.
- search: works just like apt-cache search but sorted alphabetically.
- show: works like apt-cache show but hide some details that people are less likely to care about (like the hashes). The full record is still available via apt-cache show of course.
- update: just like the regular apt-get update with color output enabled.
- install,remove: adds progress output during the dpkg run.
- upgrade: the same as apt-get dist-upgrade –with-new-pkgs.
- full-upgrade: a more meaningful name for dist-upgrade.
- edit-sources: edit sources.list using $EDITOR.
The APT first version was released back in 1998, it was designed by the debian developers to install, remove and upgrade software in debian based systems. It is one of my favourite package managers when it comes to installation of new software packages,updates or even upgrading my entire Ubuntu system.
Short Story About APT
In the old days of Linux and before the apt came to life people had to use. tar.gz and compile the software they wanted to install on their Gnu/Linux machines. But this was very boring and time consuming so when Debian system was created the developers saw it necessary for the system to include a method of managing the packages installed on the machine.
So they created a system for managing the packages and called it dpkg. But this package manager for Debian based system did not make everybody happy. It can only build, install and remove Debian packages. I am pretty sure you are very familiar with the dpkg tool if you have installed .deb packages in your system.
A fast and efficient package manager that would manage dependencies automatically and take care of their configuration files while upgrading was needed. A new dilemma came for makers of Gnu/Linux.
After alot of hard work, passion and dedication they gave birth to APT, the Advanced Packaging Tool that each of us uses nowadays to manage, install and remove packages.
Some Of The Benefits Of Using APT Package Manager And Some Simple Practical Examples
A key benefit of using the APT tool as your package manager in your system is the automation of configurations and installations of software packages. If you have experienced some cases where you had to work with Debian’s .deb packages you probably know how painful is to manually install the dependencies of the software packages.
The APT tool does it automatically for you, it resolved the dependencies and makes very easy to install software packages in your system.
The following command can always be used to solve the problem of unmet dependencies.
sudo apt-get install -f
I would like to give you guys some practical examples of common uses for the apt-get command-line utility.
To install a new package in your debian based system with the apt-get tool use the following command.
sudo apt-get install new_package
For example, if I want to install the network scanner nmap I type the following command. If you are using Ubuntu and don’t know how to open a new terminal press CTRL+ALT+T on your keryboard.
sudo apt-get install nmap
How about removing a package? It is very easy, just use the apt-get tool followed by the remove command like in the example shown below.
sudo apt-get remove nmap
As you guys can see from the above examples, the apt-get tool is very easy to use and it has some nice commands that are very human readable and even people that don’t have a technical background can relate to their specific meanings.
You can also install multiple packages by separating them by spaces like shown in the following example.
sudo apt-get install software-center python nmap
There are many other very useful commands that can help you to manage your software in your machine but we can not cover them in this article.
Read more about apt-get here.
Note: I was not able to try APT 1.0 in my own Ubuntu system because I encountered some dependency problems on my way to installing and I ended up with a broke system.