With any Linux system, managing the system software is a major part of keeping the system working properly, Ubuntu is no exception. In my previous article, I covered this information for CentOS, this article will cover the Ubuntu side of Managing Software.
There is a lot of information in this article, so make sure you have a fair understanding of everything as well as how it works together.
APT and DPKG
Two main commands used by Ubuntu are ‘apt’ and ‘dpkg’.
The command ‘apt’ stands for ‘Advanced Package Tool’. ‘Debian Package’ is what ‘dpkg’ stands for on Ubuntu.
Linux systems have a listing of Repositories to use for updating packages. A Repository has a list of all packages that it manages. The list contains the package name, version number and system architecture (x86, amd64, etc). When performing an update, ‘sudo apt update’, your system will download the repo lists to ‘/var/lib/apt/lists’. When a system upgrade is performed, ‘sudo apt upgrade’, the lists are compared to what is installed on the system. Any newer versions of packages that are found on the lists will be picked for download and installation. The upgrades will, of course, include any new dependencies. Upgrades may also cause some dependencies to be not needed anymore. The files not needed will be removed when a ‘sudo apt autoremove’ command is issued.