Files
vpsmgr/scripts
bluebluesodaandCommandCodeBot 32a44ad83e fix(scripts): keep zero stale kernels during space reclaim
The pre-zpool space reclaim kept the two newest kernels (running + one
fallback). Kernels are large (~200 MiB each), so drop to keeping ONLY
the running kernel — with two guards:

- If a NEWER kernel than the running one is already installed (upgrade
  pending a reboot), keep that too: purging it would make the next
  reboot boot an OLDER kernel than the one currently running.
- The linux-image-<arch> meta package (no version, holds no payload) is
  excluded from the purge; deleting it would silently stop apt from
  pulling future kernel upgrades.

Verified on this host: running 6.12.101 kept, 6.12.95 purged, meta
package untouched.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
2026-08-14 09:01:37 +00:00
..