Closed ahnooie closed 6 years ago
Very useful addition, I'll build it in.
For yum/dnf systems, a system setting ensures a certain amount of kernels is kept, so not applicable. For zypper, pacman and apk systems, I'm not sure.
Should be solved with the latest merge. @ahnooie can you verify if this works for you? (Tests look good.)
After testing I found autoremove does not run when combined with update, separated the two in PR #6
Okay, all build have passed. Please verify again and let me know if this addresses your issue.
Thanks again @ahnooie !
This works, thanks!
apt autoremove
It might be nice to set the autoremove parameter for apt. http://docs.ansible.com/ansible/latest/apt_module.html
On Ubuntu unless you run apt autoremove periodically the kernel updates will eventually fill up the /boot partition and you'll run out of space. I'm not sure if it's an issue with other distributions.