Installing packages and software on Linux systems can be quite challenging compared to other operating systems such as Windows or on macOS because one might need to execute several commands on the Terminal. That can be quite hectic, especially for Linux newbies, and thus need some guidance.
In this post, we will look at the various methods used to install packages on Debian 10. They include the use of:
Installing packages on Debian 10
If any of these commands sound new or unfamiliar, don’t worry. We will look at each one of them.
The apt package manager is a utility common in Debian and all Debian-based Linux distros. It performs various tasks, including installing new packages/software, updating existing packages, upgrading system packages, and even upgrading the whole Debian system.
To install a package using the apt package manager, you can either call the package name (e.g., vlc, gnome-tweaks, etc.) or the .deb file name.
For example, to install vlc, execute the command below:
sudo apt install vlc
Alternatively, if you had downloaded the
.deb file of a package like
skype.deb, you can install it using apt package manager using the syntax below:
chmod +x Package_Name sudo apt install ./Package_Name
When you use apt to install a
dpkg is used behind the scenes. The
apt utility will first make a list of all the dependencies and download them from the repository. When the download is complete,
dpkg is used to install all of the files, satisfying all dependencies.
Uninstall/remove a package using the apt package manager
To uninstall/remove a package installed with the apt command, use the remove parameter as shown below:
sudo apt remove Package_Name
If you want to remove/uninstall a package together with its configuration files, use the purge parameter. For example:
sudo apt purge Package_Name e.g sudo apt purge skypeforlinux
DPKG is a common tool in Debian and many other Linux distributions. Essentially, dpkg is used to install, build, remove, and manage Debian packages. However, unlike the APT utility (discussed above), dpkg does not automatically download package dependencies. DPKG utility comes pre-installed, and you don’t need to download any additional setup files.
To install a
.deb file using the dpkg package, run the command below with the
sudo dpkg -i Path_To_DEB_File e.g sudo dpkg -i skypeforlinux.deb
Once the execution is complete, run the command below to resolve any arising dependency errors.
sudo apt install -f
To list all installed packages, use the
Uninstall/Remove packages using the dpkg command
Removing a package with the
dpkg the utility is a straightforward process. You can either use the -r or purge parameter. The difference between the two is that –purge removes a package together with its configuration files. Use the syntax below:
sudo dpkg -r Package_Name
sudo dpkg --purge Package_Name
Installing packages using gdebi utility on Debian 10
gdebi is another command-line utility you can use to install
.deb files on your Debian system. Before installing the
gdebi will scan for and install all of the
.deb file’s dependencies. That is far better than
sudo dpkg -i skype.deb &&
sudo apt install -f in my opinion. When installing skype with the
apt install -f command, it attempted to remove 96 (!) packages.
gdebi It doesn’t come pre-installed. However, you can easily install it using the
sudo apt install gdebi
Once the installation process completes, you can now use gdebi to install any deb file on your system. use the syntax below:
sudo gdebi Package_Name e.g sudo gdebi skypeforlinux.deb
To remove any package installed with the gdebi command, use dpkg or the apt command described above. The syntax is as follows:
sudo dpkg -r Package_Name sudo apt remove Package_ Name
Installing packages with aptitude on Debian 10
Aptitude is a graphical user interface for the Advanced Packaging Tool (APT). It shows a list of software packages and allows the user to choose which ones to install or delete interactively. It has a particularly efficient search system that employs a variety of search patterns. It was originally developed for Debian, but it has since appeared in RPM-based distributions as well (such as Fedora, CentOS, etc.).
Aptitude is based on the ncurses computer terminal library, which offers an interface with certain elements found in graphical user interfaces (GUIs).
Aside from the ncurses GUI, aptitude has a robust command-line interface (CLI). Even though aptitude is a single executable file, it has command-line capabilities close to the apt-family of tools (apt-get, apt-cache, apt-listchanges, etc.). Aptitude also mimics most apt-get command-line arguments, allowing it to replace apt-get completely. Previously, it was suggested that aptitude and apt-get could not be used interchangeably.
Aptitude doesn’t come pre-installed on Debian 10. However, you can easily install it with the apt command as shown below:
sudo apt install aptitude
Once the installation process completes, you can now proceed to install packages with aptitude. Use the syntax below:
sudo aptitude install Package_Name e.g sudo aptitude install vlc
Uninstall/Remove packages with aptitude
Uninstalling/Removing a package with aptitude is a pretty straightforward process. Use the syntax below:
sudo aptitude remove Package_Name sudo aptitude remove skypeforlinux
I believe this post has given you clear instructions on how to install packages using apt, dpkg, gdebi, and aptitude utility. Do you have any additional information or comments you would want to share with our readers? Please feel free to leave a comment below.