List all the manually installed packages on Ubuntu and Debian


Author:
Themes: #Ubuntu #administration
Words: 89


1/ List all the packages initially installed by the distribution


  • gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u



2/ List all the packages actually installed by the distribution and manually by the user


  • apt list --installed | grep "\[installed\]" | cut -f1 -d/



3/ Compute the differences between the two lists, and display what is relevant


  • gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u > ~/.bash-apt-0
  • apt list --installed | grep "\[installed\]" | cut -f1 -d/ > ~/.bash-apt-1
  • diff ~/.bash-apt-0 ~/.bash-apt-1 | grep "> "