Using apt
Another method to list the installed packages is:
apt list --installed
All the packages installed manual can be printed by
apt list --manual-installed
whereas all versions get listed by:
apt list --all-versions
These are very useful commands. For instance if you want to install local installed packages to another computer, you only have to do the following command
apt list --installed | awk -F/ -v ORS=" " 'NR>1 {print $1}' > apt_packages.txt
In case you only want to get manually installed packages, try this:
apt list --manual-installed | awk -F/ -v ORS=" " 'NR>1 {print $1}' > apt_packages.txt
Now all your apt-packages are ready to install on another or new installed Ubuntu system.
sudo apt-get install < apt_packages.txt
Detailed Description
If you want to know exactly when, what and which packages have been removed take a look in your
/var/log/apt
directory. E.g. search in the history.log
files or use sed, awk, grep or your favorite text-editor to search your history files.