Listing down all the installed packages is a very useful practice. It is mostly performed by system administrators. It gives a brief idea about the existing applications on your system. Listing packages on Ubuntu is useful, especially when you are migrating from one machine to another, or want to upgrade the applications. After listing the packages on Ubuntu, you can free up your system space by removing the unused packages from your system.
Outline:
The installed packages can be retrieved through:
Ubuntu versions later than 14 come with the support of the apt package manager. It is the default package manager and can list down the installed applications on Ubuntu. Let’s check the options given below to get the list of installed packages.
Option 1: List Installed Packages
To get only the list of installed packages, use the apt list command alongside the –installed flag in the Terminal:
The –installed flag makes sure that Terminal only displays the installed packages on Ubuntu:
In the installed packages list, the:
To get the list of installed packages with minimal output, simply pipe the command to get installed packages to the less command:
Option 2: List Available and Installed Packages on Ubuntu 22.04
To get the list of both available and installed packages on Ubuntu, simply run the apt list command:
Option 3: List Upgradeable Installed Packages on Ubuntu 22.04
Alongside getting the list of installed packages, you can get the packages that can be upgraded. To get the list of upgradeable packages on Ubuntu, simply provide the –upgradeable flag to the apt list command:
Option 4: List a Specific Installed Package on Ubuntu 22.04
Provide the package name to the apt list command alongside the –installed flag to get the specified installed package on Ubuntu:
Alternatively, you can combine the apt list command with the grep command to get the specified installed package on Ubuntu.
Alternatively, users can retrieve the specific installed package by providing the package name to the apt show command:
Option 5: List All Installed Packages Versions on Ubuntu 22.04
With the apt list command, you can get the versions of all the installed packages on Ubuntu. To get the installed package versions, specify the –all-versions flag to the apt list command:
Ubuntu users can also get the list of installed packages on the system through the dpkg package manager. Check the guided options below to get the list of installed packages on Ubuntu through dpkg.
Option 1: List Installed Packages
To retrieve installed applications along with their versions on Ubuntu using the dpkg command, simply execute the below-given command:
Alternatively, you can also use the dpkg-query command to get the list of installed packages on Ubuntu 22.04. The dpkg-query command is more like an apt command. It was more common on older versions of Ubuntu which did not have the support of apt command back then. To retrieve installed packages, use the dpkg-query command as shown below:
Option 2: List a Specific Installed Package on Ubuntu 22.04
Any specific installed package on Ubuntu can be retrieved using the dpkg command when combined with the grep command. To get the specific installed package, first pipe the dpkg command alongside the -l flag to the grep command and then specify the package name:
Remember to replace the package name with your package name:
You can also get the specific installed package using the dpkg-query command. To get the specified installed package, execute the below command:
Another alternate method to get the installed packages is through the Snap package manager. This method only shows the packages installed through Snap.
To retrieve the installed applications on Ubuntu 22.04 through the snap utility, simply execute the given command:
Once Synaptic Package Manager was the default package manager on Ubuntu, and it was possibly the best package manager on Linux. However, it can still be used on Ubuntu to manage applications, such as install, remove, and get the list of applications on Ubuntu.
Follow the guided steps given below to retrieve installed applications on Ubuntu 22.04.
Step 1: Install Synaptic Package Manager
Execute the below-mentioned command to install the Synaptic Package Manager on Ubuntu:
Step 2: Launch Synaptic Package Manager
Once the Synaptic Package Manager is installed, click on the Show Applications button available in the left-bottom corner, search Synaptic and launch Synaptic Package Manager:
Enter the user password and hit the Authenticate button to launch it.
Step 3: List Installed Packages
After launching Synaptic Package Manager on Ubuntu, first, click on the Status button to get all the applications on Ubuntu. Then, click on the Installed button to only get the list of installed applications, as shown below:
You can also get the list of installed packages through the Ubuntu Software application. Check the guided steps given below to get installed applications through the Ubuntu Software application.
The dpkg-query command-line utility allows the users to save the installed packages list into the text file. To create an installed packages list, first, get the list of installed packages and then pipe them to the text file using the export sign > and specify the text file where the list of installed packages on Ubuntu 22.04 will be stored. Execute the given command to create the list of installed packages on Ubuntu 22.04:
Remember to replace the text file with your text file:
Now, read the text file to verify whether the installed packages list was created or not. To read the text file provide the text file to the cat command and then pipe it to the head command to print the first lines of the text file:
To install the saved packages on any Linux system, use the following command:
Alongside getting the installed applications, you can also count the total number of installed packages through the apt command line utility. To get the total number of installed packages on Ubuntu, first write the command to get the installed packages and then pipe it to the wc command (World Count) alongside the -l command to count the number of lines:
Alternatively, you can also count the number of installed packages using the dpkg command, as shown below:
Ubuntu lets you list down installed packages on your system. It lists down pre-installed, locally installed, and dependencies that depend on other applications on the system. The list of installed packages on Ubuntu can be retrieved through apt, dpkg, snap utility, and Ubuntu Software store. You can utilize any of the methods mentioned in the above section of this article to retrieve the list of applications installed on Ubuntu according to your preferences. Doing this will allow you to manage applications on your system and remove them to free up the disk space on the system.
One of the most critical gaps in traditional Large Language Models (LLMs) is that they…
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…