How to list all installed packages on Ubuntu

Ubuntu 14.04 and above

The apt tool on Ubuntu 14.04 and above makes this very easy.

apt list --installed

Older Versions

To get a list of packages installed locally do this in your terminal:

dpkg --get-selections | grep -v deinstall

(The -v tag “inverts” grep to return non-matching lines)

To get a list of a specific package installed:

dpkg --get-selections | grep postgres

To save that list to a text file called packages on your desktop do this in your terminal:

dpkg --get-selections | grep -v deinstall > ~/Desktop/packages

Alternatively, simply use

dpkg -l

(you don’t need to run any of these commands as the superuser, so no sudo or any other variants necessary here)

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright philipgabrielsen.no 2019
Tech Nerd theme designed by Siteturner