Skip to content

Instantly share code, notes, and snippets.

@nbhasin2
Last active August 29, 2015 14:10
Show Gist options
  • Save nbhasin2/03c5064e3ab65dd80c77 to your computer and use it in GitHub Desktop.
Save nbhasin2/03c5064e3ab65dd80c77 to your computer and use it in GitHub Desktop.
List the packages installed in ubuntu server.

##Package Installed

###Date There is a simple way to see all packages installation date. Go to:

cd /var/log Search for all dpkg.log, dpkg.log.1 by for example executing:

ls | grep 'dpkg.log'
and type:

cat /var/log/dpkg.log | cat /var/log/dpkg.log.1 | grep " install " (if you have more dpkg.log.x append them as well) As a result you will get nice list of all installed packages with exact date and time.

###All

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

dpkg --get-selections | grep -v deinstall 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 (you don't need to run this as the superuser, so no sudo necessary here)

Ref :-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment