Created
February 4, 2019 10:54
-
-
Save LeeHanYeong/41f7165bc0b74fe7b1de70d28f2e05d2 to your computer and use it in GitHub Desktop.
Linux remove old kernel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
prev=`readlink /vmlinuz.old` && prev=linux-image-${prev#*-}+ | |
exec sudo apt-get -y purge '^linux-image-[0-9]' linux-image-`uname -r`+ $prev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment