hi , I have found to internet https://3os.org/infrastructure/proxmox/pvekclean/#prerequisites for remove the old kernel in the proxmox nodes . it is a valid programs ? thank
It appears to be unmaintained/depreciated since Nov 2023. Also looking at the issues section tells a similar story.it is a valid programs ?
apt autoremove --purge
and it also removes old kernels (since PVE 7 or 6?).That will remove & purge ALL packages automatically installed and not anymore required by any other package, (including system wide configuration files). Not just kernels exclusively. Also AFAIK if you manually added/installed a kernel - this command will not remove it.apt autoremove --purge
update-grub
command to do that.Good point. I run it indeed to remove old packages that are no longer used, kernel or otherwise.That will remove & purge ALL packages automatically installed and not anymore required by any other package, (including system wide configuration files). Not just kernels exclusively. Also AFAIK if you manually added/installed a kernel - this command will not remove it.
As you mentioned: kernels I installed explicitly are kept and others are removed. Usually what I want but maybe not what the OP wanted, I see now.Also this command does not give the user control over which kernels will actually be removed - and AFAIK will leave the current kernel + one before.
Actually, it does update my ESPs with systemd-boot (ZFS in UEFI mode without SecureBoot) using proxmox-boot-tool and I do not have to update anything manually afterwards.Also this command will not update the Grub config to reflect the remaining kernels available. You would have to subsequently add theupdate-grub
command to do that.
Thank you for pointing out how my approach is not specific to kernels. I did not think about that as it works for the purpose of clean up in my case.Script above takes care of all the above.
thank you very muchIt appears to be unmaintained/depreciated since Nov 2023. Also looking at the issues section tells a similar story.
As you are probably aware, you should not use any scripts blindly from the internet - if you have not reviewed their code properly & fully understand what they attempt to do.
Having said that, I have reviewed this one & use it frequently. Here is the actual code.
update-grub
it will run but you will get this warningGenerating grub configuration file ...
W: This system is booted via proxmox-boot-tool:
W: Executing 'update-grub' directly does not update the correct configs!
W: Running: 'proxmox-boot-tool refresh
proxmox-boot-tool refresh
instead of update-grub
We use essential cookies to make this site work, and optional cookies to enhance your experience.