Last active
November 7, 2019 13:04
-
-
Save clamytoe/a465289d33d612a745a4540d6bf3675e to your computer and use it in GitHub Desktop.
Small script to check what kernels are installed with a note on how to remove unwanted ones.
This file contains 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/bash | |
clear | |
echo "##################" | |
echo "# CURRENT KERNEL #" | |
echo "##################" | |
echo "" | |
uname -r | |
echo "" | |
echo "######################" | |
echo "# INSTRALLED KERNELS #" | |
echo "######################" | |
echo "" | |
dpkg --list | grep linux-image | awk '{print $2}' | |
echo "" | |
echo "######################" | |
echo "# INSTRALLED HEADERS #" | |
echo "######################" | |
echo "" | |
dpkg --list | grep linux-headers | awk '{print $2}' | |
echo "" | |
echo "Remove unwated kernels with:" | |
echo " sudo apt autoremove" | |
echo " sudo apt-get purge linux-image-x..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment