Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to list all installed packages

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system. How would I do this?
by

2 Answers

akshay1995
copy the file /var/lib/apt/extended_states, which is a text file database in this format:

Package: grub-common
Architecture: amd64
Auto-Installed: 0

Package: linux-headers-2.6.35-22-generic
Architecture: amd64
Auto-Installed: 1

Auto-Installed: 0 indicates that the package was expressly installed and is not just a dependency.
sandhya6gczb
The apt tool on Ubuntu 14.04 and above makes this very easy.

apt list --installed

Login / Signup to Answer the Question.