Q. How do I list all installed packages on Linux or FreeBSD system?
A. Most Linux distributions are based upon rpm or apt-get / dpkg packaging system.
RedHat, Fedora Core, Suse Linux, Cento os all are RPM based distribution
Use rpm command as follows to list all installed packages
rpm -qa
rpm -qa | grep 'package-name'
rpm -qa | grep -i '*httpd*'
Debian or Ubuntu Linux distribution
You can use dpkg command to list all installed packages:
dpkg --list
dpkg --list | grep 'package-name'
dpkg --list | grep -i '*php*'
Task: OpenBSD list installed package
Use pkg_info command for displaying information on all installed software packages
$ pkg_info
$ pkg_info | grep 'package-name'
Output:
bash-3.1.10_1 The GNU Project's Bourne Again SHell expat-2.0.0_1 XML 1.0 parser written in C gettext-0.14.5_2 GNU gettext package lftp-3.4.0_3 Shell-like command line ftp client libiconv-1.9.2_2 A character set conversion library libstatgrab-0.12_1 Provides a useful interface to system statistics nmap-4.01 Port scanning utility for large networks pcre-6.6_1 Perl Compatible Regular Expressions library pkgconfig-0.20 A utility to retrieve information about installed libraries vim-lite-6.4.6_1 Vi "workalike", with many additional features (Lite package
Task: FreeBSD list installed package
Use pkg_info command as described above.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 6 comments… read them below or add one }
FreeBSD: pkg_info -Ix ‘any-part-of-package-name’
Thanks a lot for help.
Really it helped lots.
For packages management better is dselect. It can list, display status and choose packages for install/reinstall/uninstall.
how to download redhat packages ………..
hiiii………….
how to know the default installed package in ltib?
please reply sir……….
FWIW, Arch Linux: pacman -Qqe