Saturday 27 July 2019

linux - How can I display the list of all packages installed on my Debian system?


How can I get the list of all packages installed on my Debian system (I know this one is easy)? And also a list of all packages marked as manual? I am thinking about system upgrade, but I can't remember all these things I installed over the years :)



Answer



Getting the list of installed packages is simple:


dpkg --get-selections | grep "[[:space:]]install$" >  installed_pkgs

You can later reinstall the packages in the list using this command:


dpkg --set-selections < installed_pkgs
sudo apt-get -u dselect-upgrade

If you've used aptitude exclusively to manually install packages, it is very easy to get a nice list of manually installed packages. Otherwise, this list will include both packages you installed, and their dependencies.


In either case, read through this article and comments for a coherent solution to generating the list of manually installed packages: Cleaning up a Debian GNU/Linux system.


You might find deborphan and debfoster of help in maintaining this list in future.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...