New answers tagged aptitude
The autoremoval of kernels in Ubuntu are controlled by the /etc/kernel/postinst.d/apt-auto-removal file. If the package is not marked for hold, than it should keep the last two versions and the newer ones. This means that you have to run the lastest version to can remove the older ones. After you rebooted the latest kernel, issue the command: sudo apt-get ...
apt list "*linux*" --installed
There is indeed an 'official' pkginstall.sh script that can do this. Follow the instructions in the official documentation. Briefly, download the script from the above link, make sure it is executable and then run with: ~/pkginstalls.sh This will creates a file in your home directory called pkginstalls.txt with all the details.
Top 50 recent answers are included