Kernel Clean script doesn't remove 4 old (ii) kernels on PVE 8 #111

Closed
opened 2026-02-04 16:40:17 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @onetimecontributor on GitHub (Nov 27, 2024).

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

On my Proxmox 8.3.0 (clean install, no on-top-of), executing the script results is 0 removed kernels, though there are 4 of them (ii) beside the two latest

What settings are you currently utilizing?

  • Default Settings
  • Advanced Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

No response

Please provide detailed steps to reproduce the issue.

  1. check kernels via "dpkg --list|grep proxmox-kernel.-pve." - 6 in total, one iU, one not installed due to lack of disk space (6.8, tat's why I'm trying to clean it up), 4 more marked as ii
  2. execute the script (as of 27.11) via bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)"
  3. reboot
  4. check kernels via dpkg --list|grep proxmox-kernel.-pve.

Expected: the list after 4 will differ from that in step 1
Actual: the list is the same
I had to uninstall them manually via dpkg -P that worked just fine

Originally created by @onetimecontributor on GitHub (Nov 27, 2024). ### Please verify that you have read and understood the guidelines. yes ### A clear and concise description of the issue. On my Proxmox 8.3.0 (clean install, no on-top-of), executing the script results is 0 removed kernels, though there are 4 of them (ii) beside the two latest ### What settings are you currently utilizing? - [X] Default Settings - [ ] Advanced Settings ### Which Linux distribution are you employing? Debian 12 ### If relevant, including screenshots or a code block can be helpful in clarifying the issue. _No response_ ### Please provide detailed steps to reproduce the issue. 1. check kernels via "dpkg --list|grep proxmox-kernel.*-pve.*" - 6 in total, one iU, one not installed due to lack of disk space (6.8, tat's why I'm trying to clean it up), 4 more marked as ii 2. execute the script (as of 27.11) via bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)" 3. reboot 4. check kernels via dpkg --list|grep proxmox-kernel.*-pve.* Expected: the list after 4 will differ from that in step 1 Actual: the list is the same I had to uninstall them manually via dpkg -P <kernel> that worked just fine
OVERLORD added the question label 2026-02-04 16:40:17 +03:00
Author
Owner

@tjcomserv commented on GitHub (Dec 3, 2024):

Just a thought, I presume when you ran the script, it gave a list of kernels and you manually selected the ones you wanted to delete like in the image below?

image

@tjcomserv commented on GitHub (Dec 3, 2024): Just a thought, I presume when you ran the script, it gave a list of kernels and you manually selected the ones you wanted to delete like in the image below? ![image](https://github.com/user-attachments/assets/7cae4a4a-9554-4568-8b7a-da8db22c99b7)
Author
Owner

@onetimecontributor commented on GitHub (Dec 3, 2024):

Just a thought, I presume when you ran the script, it gave a list of kernels and you manually selected the ones you wanted to delete like in the image below?

yes, I've checked 1 out of 6 for the test

@onetimecontributor commented on GitHub (Dec 3, 2024): > Just a thought, I presume when you ran the script, it gave a list of kernels and you manually selected the ones you wanted to delete like in the image below? > yes, I've checked 1 out of 6 for the test
Author
Owner

@havardthom commented on GitHub (Dec 5, 2024):

Did you get any errors? And did you get the Removing 'selected' old Kernels info message?

msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}"
/usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1
msg_ok "Successfully Removed Kernels"
@havardthom commented on GitHub (Dec 5, 2024): Did you get any errors? And did you get the `Removing 'selected' old Kernels` info message? ``` msg_info "Removing ${CL}${RD}$(echo $remove_kernels | awk '{print NF}') ${CL}${YW}old Kernels${CL}" /usr/bin/apt purge -y $remove_kernels >/dev/null 2>&1 msg_ok "Successfully Removed Kernels" ```
Author
Owner

@onetimecontributor commented on GitHub (Dec 5, 2024):

Did you get any errors? And did you get the Removing 'selected' old Kernels info message?

errors - nope, I would include this essential info into the report. No warnings, no errors, can't recall I've seen any progress-like indicator (it's unlikely), just silent exit of the script with no expected outcome.
As I had to remove them manually, I no longer have infra to reproduce - though I will eventually get it again, as kernels will pile up.

@onetimecontributor commented on GitHub (Dec 5, 2024): > Did you get any errors? And did you get the `Removing 'selected' old Kernels` info message? errors - nope, I would include this essential info into the report. No warnings, no errors, can't recall I've seen any progress-like indicator (it's unlikely), just silent exit of the script with no expected outcome. As I had to remove them manually, I no longer have infra to reproduce - though I will eventually get it again, as kernels will pile up.
Author
Owner

@MickLesk commented on GitHub (Dec 9, 2024):

can you test the dev change here?

 bash -c "$(wget -qLO - https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/kernel-clean.sh)"

it need some time, because proxmox changed some things in background

@MickLesk commented on GitHub (Dec 9, 2024): can you test the dev change here? ```bash bash -c "$(wget -qLO - https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/kernel-clean.sh)" ``` it need some time, because proxmox changed some things in background
Author
Owner

@darc432 commented on GitHub (Dec 13, 2024):

can you test the dev change here?

 bash -c "$(wget -qLO - https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/kernel-clean.sh)"

it need some time, because proxmox changed some things in background

I tested and it is working (dev).

@darc432 commented on GitHub (Dec 13, 2024): > can you test the dev change here? > > ```shell > bash -c "$(wget -qLO - https://raw.githubusercontent.com/MickLesk/Proxmox_DEV/refs/heads/main/misc/kernel-clean.sh)" > ``` > > it need some time, because proxmox changed some things in background I tested and it is working (dev).
Author
Owner

@MickLesk commented on GitHub (Dec 13, 2024):

Perfect. Then i prepare an Bugfix PR asap

@MickLesk commented on GitHub (Dec 13, 2024): Perfect. Then i prepare an Bugfix PR asap
Author
Owner

@onetimecontributor commented on GitHub (Jan 12, 2025):

had a chance to check it - it works for me as well, thank you for the fix!

@onetimecontributor commented on GitHub (Jan 12, 2025): had a chance to check it - it works for me as well, thank you for the fix!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#111