Proxmox VE Kernel Clean - Failed to remove old kernels #209

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

Originally created by @caporalesimone on GitHub (Dec 22, 2024).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Proxmox VE Kernel Clean

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)"

📝 Provide a clear and concise description of the issue.

After running this script and selecting the fist of 4 kernels available in the list I get the error:

    __ __                     __   ________
   / //_/__  _________  ___  / /  / ____/ /__  ____ _____
  / ,< / _ \/ ___/ __ \/ _ \/ /  / /   / / _ \/ __ `/ __ \
 / /| /  __/ /  / / / /  __/ /  / /___/ /  __/ /_/ / / / /
/_/ |_\___/_/  /_/ /_/\___/_/   \____/_/\___/\__,_/_/ /_/

 - Removing 1 old kernels... - Failed to remove kernel: proxmox-kernel-6.8.4-2-pve-signed. Check dependencies or manual removal.... - Up
 ✓ GRUB updated successfully
 ✓ Finished
root@proxmox:~#

Tried with different kernels in list and same error

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Ubuntu 24.10

🔄 Steps to reproduce the issue.

Execute
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)"
And select one kernel in the list

Paste the full error output (if available).

Removing 1 old kernels... - Failed to remove kernel: proxmox-kernel-6.8.4-2-pve-signed. Check dependencies or manual removal....

🖼️ Additional context (optional).

Virtual Environment 8.3.2
Kernel Version Linux 6.8.12-4-pve (2024-11-06T15:04Z)
Boot Mode EFI
Manager Version pve-manager/8.3.2/3e76eec21c4a14a

Originally created by @caporalesimone on GitHub (Dec 22, 2024). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Proxmox VE Kernel Clean ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)" ### 📝 Provide a clear and concise description of the issue. After running this script and selecting the fist of 4 kernels available in the list I get the error: ``` __ __ __ ________ / //_/__ _________ ___ / / / ____/ /__ ____ _____ / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / /_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ - Removing 1 old kernels... - Failed to remove kernel: proxmox-kernel-6.8.4-2-pve-signed. Check dependencies or manual removal.... - Up ✓ GRUB updated successfully ✓ Finished root@proxmox:~# ``` Tried with different kernels in list and same error ### ⚙️ What settings are you using? - [X] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Ubuntu 24.10 ### 🔄 Steps to reproduce the issue. Execute `bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/kernel-clean.sh)"` And select one kernel in the list ### ❌ Paste the full error output (if available). Removing 1 old kernels... - Failed to remove kernel: proxmox-kernel-6.8.4-2-pve-signed. Check dependencies or manual removal.... ### 🖼️ Additional context (optional). Virtual Environment 8.3.2 Kernel Version Linux 6.8.12-4-pve (2024-11-06T15:04Z) Boot Mode EFI Manager Version pve-manager/8.3.2/3e76eec21c4a14a
Author
Owner

@bearhntr commented on GitHub (Dec 23, 2024):

I am getting the same error - about 3 weeks now.

__ __                     __   ________

/ ///__ _________ ___ / / / / / ____ _____
/ ,< / _ / / __ / _ / / / / / / _ / __ `/ __
/ /| / _/ / / / / / / / / // / __/ /
/ / / / /
/
/ |
___/
/ /
/ /
/_// _//___/_,// /_/

  • Removing 5 old kernels... - Failed to remove kernel: proxmox-kernel-6.5.11-7-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.11-8-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.13-3-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.13-5-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.
    ✓ GRUB updated successfully
    ✓ Finished
    root@pve01:# uname -a
    Linux pve01 6.8.12-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-4 (2024-11-06T15:04Z) x86_64 GNU/Linux
    root@pve01:
    # cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
@bearhntr commented on GitHub (Dec 23, 2024): I am getting the same error - about 3 weeks now. __ __ __ ________ / //_/__ _________ ___ / / / ____/ /__ ____ _____ / ,< / _ \/ ___/ __ \/ _ \/ / / / / / _ \/ __ `/ __ \ / /| / __/ / / / / / __/ / / /___/ / __/ /_/ / / / / /_/ |_\___/_/ /_/ /_/\___/_/ \____/_/\___/\__,_/_/ /_/ - Removing 5 old kernels... - Failed to remove kernel: proxmox-kernel-6.5.11-7-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.11-8-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.13-3-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6.5.13-5-pve-signed. Check dependencies or manual removal.... - Failed to remove kernel: proxmox-kernel-6. ✓ GRUB updated successfully ✓ Finished root@pve01:~# uname -a Linux pve01 6.8.12-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-4 (2024-11-06T15:04Z) x86_64 GNU/Linux root@pve01:~# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Author
Owner

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

Looks Like the kernel is pinned in some LXC.
Like the Message say, Check it or remove manually

@MickLesk commented on GitHub (Dec 24, 2024): Looks Like the kernel is pinned in some LXC. Like the Message say, Check it or remove manually
Author
Owner

@xodaaaa commented on GitHub (Dec 24, 2024):

I have the same problems on clean Proxmox 8.3.2 installations.
only manual deletion takes effect

@xodaaaa commented on GitHub (Dec 24, 2024): I have the same problems on clean Proxmox 8.3.2 installations. only manual deletion takes effect
Author
Owner

@bearhntr commented on GitHub (Dec 24, 2024):

I used these steps - after a GOOGLE search and was able to clean-up all the old Kernels (I got rid of all of them - except 'one back' from current).

To remove an old Proxmox kernel, use the command apt purge <kernel-package-name> in your terminal, where <kernel-package-name> is the specific package name of the old kernel you want to delete, which will usually be in the format "proxmox-kernel-x.x.x-pve".

Key steps:

  • Identify the old kernel: Use dpkg --list | grep proxmox-kernel to list all installed Proxmox kernels and identify the one you want to remove.
  • Remove the kernel: Execute the command sudo apt purge <kernel-package-name> (sudo is not needed if you are already logged in as 'root' and launch the )

Important considerations:

Always keep a backup kernel:
Before removing an old kernel, ensure you have at least one other functional kernel available on your system.
Check for dependencies:
Use apt autoremove after removing the kernel package to clean up any associated dependencies.

@bearhntr commented on GitHub (Dec 24, 2024): I used these steps - after a GOOGLE search and was able to clean-up all the old Kernels (I got rid of all of them - except 'one back' from current). To remove an old Proxmox kernel, use the command ```apt purge <kernel-package-name>``` in your terminal, where ```<kernel-package-name>``` is the specific package name of the old kernel you want to delete, which will usually be in the format "**proxmox-kernel-x.x.x-pve**". ### Key steps: - Identify the old kernel: Use ```dpkg --list | grep proxmox-kernel``` to list all installed Proxmox kernels and identify the one you want to remove. - Remove the kernel: Execute the command ```sudo apt purge <kernel-package-name>``` _(sudo is not needed if you are already logged in as 'root' and launch the <shell>)_ ### Important considerations: **_Always keep a backup kernel:_** Before removing an old kernel, _ensure you have at least one other functional kernel available_ on your system. **_Check for dependencies:_** Use ```apt autoremove``` after removing the kernel package to clean up any associated dependencies.
Author
Owner

@jakemauer commented on GitHub (Dec 27, 2024):

I'm currently running Proxmox 8.3.2 with kernel 6.11.0-2-pve and am unable to remove old kernels. For example I get errors like: `Failed to remove kernel: proxmox-kernel-6.8.12-4-pve-signed. Check dependencies or manual removal``

When I attempt to manually remove a kernel using apt purge it attempts to remove the old kernel but then halts with the following error:

W: (pve-apt-hook) !! WARNING !!
W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'!

And then I obviously don't proceed. These errors occur for all three of the older kernels still on my system.

@jakemauer commented on GitHub (Dec 27, 2024): I'm currently running Proxmox 8.3.2 with kernel 6.11.0-2-pve and am unable to remove old kernels. For example I get errors like: `Failed to remove kernel: proxmox-kernel-6.8.12-4-pve-signed. Check dependencies or manual removal`` When I attempt to manually remove a kernel using `apt purge` it attempts to remove the old kernel but then halts with the following error: ``` W: (pve-apt-hook) !! WARNING !! W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'! ``` And then I obviously don't proceed. These errors occur for all three of the older kernels still on my system.
Author
Owner

@thebatfink commented on GitHub (Dec 29, 2024):

I used these steps - after a GOOGLE search and was able to clean-up all the old Kernels (I got rid of all of them - except 'one back' from current).

To remove an old Proxmox kernel, use the command apt purge <kernel-package-name> in your terminal, where <kernel-package-name> is the specific package name of the old kernel you want to delete, which will usually be in the format "proxmox-kernel-x.x.x-pve".

Key steps:

  • Identify the old kernel: Use dpkg --list | grep proxmox-kernel to list all installed Proxmox kernels and identify the one you want to remove.
  • Remove the kernel: Execute the command sudo apt purge <kernel-package-name> (sudo is not needed if you are already logged in as 'root' and launch the )

Important considerations:

Always keep a backup kernel: Before removing an old kernel, ensure you have at least one other functional kernel available on your system. Check for dependencies: Use apt autoremove after removing the kernel package to clean up any associated dependencies.

Thanks. Also finding the script would not remove anything at all. Removed them manually with your instructions no issue.

@thebatfink commented on GitHub (Dec 29, 2024): > I used these steps - after a GOOGLE search and was able to clean-up all the old Kernels (I got rid of all of them - except 'one back' from current). > > To remove an old Proxmox kernel, use the command `apt purge <kernel-package-name>` in your terminal, where `<kernel-package-name>` is the specific package name of the old kernel you want to delete, which will usually be in the format "**proxmox-kernel-x.x.x-pve**". > > ### Key steps: > * Identify the old kernel: Use `dpkg --list | grep proxmox-kernel` to list all installed Proxmox kernels and identify the one you want to remove. > * Remove the kernel: Execute the command `sudo apt purge <kernel-package-name>` _(sudo is not needed if you are already logged in as 'root' and launch the )_ > > ### Important considerations: > **_Always keep a backup kernel:_** Before removing an old kernel, _ensure you have at least one other functional kernel available_ on your system. **_Check for dependencies:_** Use `apt autoremove` after removing the kernel package to clean up any associated dependencies. Thanks. Also finding the script would not remove anything at all. Removed them manually with your instructions no issue.
Author
Owner

@networkoctopus commented on GitHub (Dec 30, 2024):

I'm getting the same issue after updating to 8.3.2 today. This is the first time I've had issues with this script, and no LXC has the kernel pinned.
I'm not sure why the issue was closed.

@networkoctopus commented on GitHub (Dec 30, 2024): I'm getting the same issue after updating to 8.3.2 today. This is the first time I've had issues with this script, and no LXC has the kernel pinned. I'm not sure why the issue was closed.
Author
Owner

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

Closed issue = closed issue. Dont comment. Nobody see this.

And its another issue active.

@MickLesk commented on GitHub (Dec 31, 2024): Closed issue = closed issue. Dont comment. Nobody see this. And its another issue active.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#209