Advertisement
metalx1000

list of installed packages on Debian

Feb 6th, 2017
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #list all installed packages with dpkg
  2. dpkg --get-selections| grep -v deinstall
  3. #get a count of installed packages
  4. dpkg --get-selections| grep -v deinstall|sc -l
  5.  
  6. #list all installed with apt
  7. apt list --installed
  8. #get a count with apt
  9. apt list --installed|grep -v "^Listing"|sc -l
  10.  
  11. ###backup list of installed packages###
  12. dpkg --get-selections | grep -v deinstall > packages.lst
  13. sudo apt-get install -y $(< packages.lst)
  14. sudo apt-get autoremove
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement