更新 rm-old-pve-kernel.sh

This commit is contained in:
chinky 2023-09-03 21:21:37 +08:00
parent 6d9a55a9df
commit 6bd1ca7bd4
1 changed files with 1 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#!/bin/env bash #!/bin/env bash
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get -y autoclean
apt-get purge $( dpkg --list | grep -P -o "pve-kernel-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d") ) apt-get purge $( dpkg --list | grep -P -o "pve-kernel-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d") )