How to check packages list in ubuntu
To check the list of installed packages on Ubuntu, you can use several methods. Here are the most common ones:
1. Using dpkg Command
The dpkg command can list all installed packages:
dpkg --get-selections
This will display a list of all installed packages along with their installation status.
2. Using apt Command
The apt command provides a more human-readable output:
apt list --installed
This will show a list of installed packages along with their versions.
3. Using dpkg-query Command
You can also use dpkg-query for more detailed output:
dpkg-query -l
This will display the list of installed packages with additional information like package name, version, and a brief description.
4. Search for a Specific Package
If you're looking for a specific package to see if it's installed, you can use:
dpkg -l | grep package_name
Replace package_name with the name of the package you're searching for.
5. List Packages by Size
To list installed packages sorted by size:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
This will sort packages by their installed size in ascending order.
6. Using synaptic Package Manager (GUI method)
If you prefer a graphical interface, you can install and use Synaptic Package Manager:
sudo apt install synaptic
Once installed, you can open Synaptic and view, search, or filter installed packages.
7. Generate a List of Installed Packages
To generate a list of installed packages and save it to a file:
dpkg --get-selections > installed_packages.txt
This will create a file called installed_packages.txt with a list of all installed packages.
These methods should help you check and manage the installed packages on your Ubuntu system.
Written by Shaikh Abdul Shahid
A Full-Stack Developer with experience in PHP, Laravel, JavaScript, and React.
Founder of Online Learner, sharing practical knowledge and programming tutorials.
Building and maintaining real-world web applications since 2017.
Your Feedback
Help us improve by sharing your thoughts
Online Learner helps developers master programming, database concepts, interview preparation, and real-world implementation through structured learning paths.
Quick Links
© 2023 - 2026 OnlineLearner.in | All Rights Reserved.
