Skip to content

Kernel-Clean: detect meta-packages and fix silent removal failures#14674

Merged
michelroegl-brunner merged 2 commits into
mainfrom
patch_kernelclean
May 25, 2026
Merged

Kernel-Clean: detect meta-packages and fix silent removal failures#14674
michelroegl-brunner merged 2 commits into
mainfrom
patch_kernelclean

Conversation

@MickLesk

Copy link
Copy Markdown
Member

✍️ Description

  • Replace grep 'kernel-.*-pve' with an awk /^ii/ + grep -E '^proxmox-kernel-[0-9]+.[0-9]+.[0-9]' pipeline. This filters out rc-state (config-only) packages and the two-segment meta-packages (proxmox-kernel-X.Y) that the old regex missed entirely.

  • for each selected kernel, the script now derives the corresponding meta-package name (proxmox-kernel-X.Y) and co-purges it when no other versioned kernel of that minor version remains installed. This prevents apt from blocking or undoing the removal due to the reverse dependency the meta-package holds.

🔗 Related Issue

Fixes #14661

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

This comment was marked as spam.

@michelroegl-brunner michelroegl-brunner merged commit 514fece into main May 25, 2026
3 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 29, 2026
@github-actions github-actions Bot deleted the patch_kernelclean branch June 3, 2026 09:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PVE Kernel Clean] Kernels not being deleted

4 participants