How to List Installed Packages in Ubuntu 20.04

Did you know that there are thousands of packages installed on your Linux system? You might be wondering where these packages came from. A lot of your packages come pre-installed on a newly installed Linux system. You have probably also installed more packages over time to enhance the functionalities of the system.

Sometimes, you might wish to list the packages that are installed on your system. In this article, you will learn how to list the packages that are installed on your Ubuntu system. This article will cover how to:

  • List installed packages with the apt command
  • List installed packages with the dpkg command
  • List installed Snap Packages
  • Count installed packages

Note: We have run the commands and procedure mentioned in this article on Ubuntu 20.04.

We will use the command-line Terminal for executing the commands. To open the command line Terminal in Ubuntu, use the Ctrl+Alt+T keyboard shortcut.

List Installed Packages Using apt Command

Apt is a built-in package manager in Ubuntu that helps you install, update, and remove packages from your Ubuntu system. The apt command can be used to display the list of installed packages on your system. To use the apt command, open the Terminal using the Ctrl+Alt+T keyboard shortcut and run the following command:

$ apt list --installed

This command will list all the packages that have been installed on your system using the apt command and using the .deb files, as well as listing the packages installed as dependencies.

The output displays the package names, along with the installed versions and the architecture.

To check whether a package is installed, run the following command:

$ apt list --installed | grep package_name

Example:

$ apt list --installed | grep webmin

To view information about a specific package, run the following command:

$ apt show package_name

Example:

$ apt show webmin

List Installed Packages Using dpkg Command

Dpkg is used to install, build, and remove packages in Debian OS and its derivates. The dpkg-query command can be used to list all installed packages on a system.

Enter the following command in the Terminal to list all the installed packages on your system:

$ dpkg-query -l

The output displays the package names, along with their installed versions and the architecture.

To check whether a specific package is installed, run the following command:

$ dpkg-query –l package name

Example

$ dpkg-query –l webmin

List Installed Snap Packages

The apt and dpkg-query commands do not list the packages that are installed as snaps. You can list these separately with the snap command.

Run the following command in the Terminal to list all packages installed as snaps on your system:

$ snap list

Count Installed Packages

Along with listing installed packages, you can also find out how many packages are installed on your system. To do so, use the following command in the Terminal:

$ apt list --installed | grep -v "^Listing" | wc -l

That is all there is to it!

Conclusion

In this article, you learned how to list installed packages on your Ubuntu 20.04 system. You also learned how to check whether a particular package is installed, and how to get a quick count of the installed packages.



from Linux Hint https://ift.tt/2Nv3Lgh

Post a Comment

0 Comments