How to list all installed packages in Ubuntu, CentOS and other Linux systems?

There are several ways to list installed packages in Ubuntu, like: sudo dpkg-query -Wf '${Installed-Size} - ${Package}n \n' | sort -n sudo aptitude search '?installed' In CentOS run one of these commands: yum list installed On any Linux machine with rpm installed: You need to use rpm command to display all installed packages in Linux.

Red Hat/Fedora Core/CentOS Linux

Type the following command to get list of all installed software
# rpm -qa | less

Debian Linux

Type the following command to get list of all installed software:
# dpkg --get-selections

Ubuntu Linux

Type the following command to get list of all installed software:
# sudo dpkg --get-selections

FreeBSD

Type the following command to get list of all installed software:
# pkg_info | less # pkg_info apache

Use pkg_version command to summarizes the versions of all installed packages:
# pkg_version | less # pkg_version | grep 'lsof'

OpenBSD

OpenBSD also use pkg_info command to display list of all installed packages or software:
# pkg_info | less
# pkg_info apache

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.