Last active
June 3, 2021 19:54
-
-
Save jikamens/1b1fa965024d959c823f224c063cd78e to your computer and use it in GitHub Desktop.
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 -e | |
# You will probably need to adjust this script if you aren't using | |
# the generic kernel. | |
to_hold= | |
pd=/tmp/packages.$$ | |
mkdir $pd | |
# Get good Mesa packages | |
while read package arch version; do | |
to_hold="$to_hold $package:$arch" | |
done < <(dpkg-query --show --showformat \ | |
'${Package} ${Architecture} ${Version} ${Source}\n' \ | |
'*mesa*' '*libgbm1*' | | |
awk '$4 == "mesa" {print $1, $2, $3}') | |
# Get good Kernel packages | |
while read package arch; do | |
to_hold="$to_hold $package:$arch" | |
done < <(dpkg-query --show --showformat \ | |
'${Package} ${Architecture} ${Version} ${Source}\n' '*linux*' | | |
awk '$4 == "linux" || $4 == "linux-signed" {print $1, $2}' | | |
sed 's/-5\.[0-9.]*-[0-9]*/-5.10.0-14/' | sort -u) | |
# Get good Kernel meta-packages | |
while read package arch version; do | |
to_hold="$to_hold $package:$arch" | |
done < <(dpkg-query --show --showformat \ | |
'${Package} ${Architecture} ${Version} ${Source}\n' '*linux*' | | |
awk '$4 == "linux-meta" {print $1, $2, $3}') | |
apt-get remove evdi-dkms libevdi0 | |
rm -rf /var/lib/dkms/evdi | |
apt-mark unhold $to_hold | |
apt-get update | |
apt-get dist-upgrade | |
rm -rf $pd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment