Created
November 29, 2021 16:54
-
-
Save charlieporth1/92e36e17604c2590bf24ae198b74d6b1 to your computer and use it in GitHub Desktop.
Simple apt lock & fix for Ubuntu
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 | |
if [[ -f /var/lib/dpkg/lock ]]; then | |
rm /var/lib/apt/lists/lock | |
rm /var/cache/apt/archives/lock | |
rm /var/lib/dpkg/lock* | |
fi | |
yes | sudo dpkg --configure -a | |
yes | apt -y --fix-broken install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment