when I ran it recently it showed me this
~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-headers-5.15.0-46 linux-headers-5.15.0-46-generic linux-image-5.15.0-46-generic linux-modules-5.15.0-46-generic linux-modules-extra-5.15.0-46-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 583 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
should I not trust autoremove anymore? I usually run apt autoremove and clean cause it helps avoiding breaking packages during apt upgrade
This
autoremove
command removes one specific older kernel version that is not anymore in use. Nowadays,autoremove
also will remove older kernels, except the previous kernel and the current one. Thus, you always keep the option to boot to the previous kernel. It therefore is a safe way to automatically clean up older kernels.In general,
autoremove
removes packages that once were automatically installed, i.e., as a dependency of another package, but which currently are not anymore required by any other package, thus only take up disk space.