The operating system distribution is a platform for working with a software environment that includes many different applications and utilities. Both client ones to perform basic tasks and administrator tools to manage the device. To install and work with them, binary files, images with virtualisation platforms, source code, instruction sets with interpreters/compilers, as well as archived packages deb, rpm and others are used. In this tutorial we will focus on specialised Debian family archives.
How to install a deb package quickly?
Let's not hesitate and choose a source from which to download the deb, it can be a repository, a web server or a file store. For example, let's find the packages we need in the Docker repository and download them using wget or curl:
Afterwards, we will access it using dpkg or apt and install its contents. Note that it is important to specify the path to the deb file, because the package manager does not know its location:
If you try to specify only the name you may get the following error, so it is important to identify the full path or specify the current directory!
All steps in the tutorial can be performed on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.
It will take some time to deploy server capacity. After that you can connect in any of the convenient ways!
Let's spell out the command for installation:
Let's wait until the archive is unpacked and the necessary dependencies are installed:
Note that the installed utility is now called containerd.io. And to work with it through the package manager you should use this name. The data on the screenshot shows that the utility is installed and its daemon has been raised! Let's check it through the initialisation manager:
If the service is in the active state, we can assume that the utility has been installed successfully. However, not all packages have daemons, deb packages may contain scripts, images and other solutions.
It is also possible to install through the package manager directly, using the system repositories. To do this, write the command:
To search for packages among the repositories, use the apt search command or apt list | grep 'package'.
Where did the deb package get installed?
Pay attention to the structure of the file, it will indicate where the package may have been installed for this we use the command dpkg --content [packet_name.deb]:
Among the whole list, you should pay attention to packages with a size greater than 0 and a path that contains the bin folder. Usually all binary and executable files should be in the appropriate directory.
Let's consider more files from this list and find out where configuration data and other components are located. Usually all configuration files are unpacked to /etc for the utility to work, which we can see in the picture above. The libraries necessary for operation are in the /lib directory, and the daemon with documentation in systemd and man respectively. But what if packages were installed by mistake or need to be uninstalled for N reason?
How to remove a deb package?
In order to remove a package, we need to know its name, not in .deb format, but the one assigned by the package manager during unpacking. To do this, let's look at the package's meta data with the apt show command:
The screenshot shows a lot of different information about the package: its version, dependencies, counter-dependencies, size and other information. To remove the corresponding package, you need to specify its name:
For complete and irrevocable removal use the command:
The process of installing deb packages is easy if you follow the instructions, but it is important to understand the package structure and contents. We also covered commands to verify the installation and manage services, as well as how to uninstall packages to avoid possible conflicts or freeing up system resources.