Friday, January 29, 2016

Aptitude Commands

I keep having to look this up, so...

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

No comments:

Post a Comment