Installing, updating, and removing packages is one of the tasks that every user has to do on Linux. To perform these operations, you will need a Package Manager.
A concept of Package Management is the method through which the software is distributed in Linux. There are different GUI package management tools available for all Linux distributions. In the Linux Mint, the Synaptic Package Manager is a popular built-in tool, used for managing the packages. In this tutorial, we are going to explain the managing of packages in Linux Mint 21.
What is a Package in Linux Mint 21
In Linux Mint, the package is the archive or compressed file that contains all the information for installing specific software. The Package formats are used when multiple files including source and text data files are combined in a single archive. The package contains the software name, its purpose, and version number. These packages are used for the installation of the software on Linux Mint.
There are multiple package formats in Linux Mint including Debian packages (.Deb), TAR archives (.tar), TGZ (.tgz), and GZip archives (.gz).
Deb is the native software package format for Linux Mint. It is developed for the Debian-based Linux distributions, each package contains two archive files one with control information and the other with the installable data. These files are in .tar format and package management for deb files is dpkg. It handles the packing unpacking installation, updation, and removal of software from Linux Mint.
How to Manage Packages on Linux Mint 21 Using Synaptic Package Manager
A concept of package management is the way of distributing software in Linux. Synaptic Package Manager is a modern and user-friendly package manager in Linux Mint. It is used to install and manage software and provides great flexibility to developers and users. You can access the synaptic package manager through your Linux Mint menu. Open the menu and search for the Synaptic Package Manager:
You can search for any installed software through the search icon:
How to Install and Remove Packages on Linux Mint Via Command Line
To install a package via command line apt package manager is used, the syntax of installing a package is mentioned below:
To remove a package using apt package manager use:
How to List all the Installed Packages on Linux Mint Via Command Line
You can view the installed packages on the Linux Mint through the GUI, but the other approach is via the command list. To list the installed apt packages, execute the below command:
You can also get the list of installed packages through dpkg command, copy, and paste the command in your terminal and hit enter:
How to Search for a Package in Linux Mint 21 Via Command Line
Searching the desired installed package on Linux Mint is also possible via the command line. Below is the syntax of the command for searching a package in Linux Mint 21:
In our case we are executing the command for searching the installed java package on Linux Mint
apt search Java:
You can also use the apt-cache for searching the package in the Linux terminal as well:
Here I am searching astro-java installed package on my Linux system
Installing, updating, and removing packages on Linux Mint 21 requires a package manager and software repositories. There are two different ways for managing a package on Linux Mint including GUI and terminal. The Synaptic Package Manager is the default manager of the Linux Mint. You can also use the command line for managing the different software on Linux Mint 21.