Created
June 3, 2022 00:28
-
-
Save haeramkeem/0285c18b05d4f73cc57937f226d5f646 to your computer and use it in GitHub Desktop.
dpkg: error: dpkg frontend lock is locked by another process
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/bash | |
# dpkg: error: dpkg frontend lock is locked by another process | |
# Ref: https://askubuntu.com/a/291584 | |
# Check PID of the running dpkg process | |
lsof /var/lib/dpkg/lock | |
# See status of the process | |
ps cax | grep ${PID} | |
# If it's still running: | |
kill ${PID} | |
kill -9 ${PID} | |
# Check kill result | |
ps cax | grep ${PID} | |
# Remove lock file | |
sudo rm /var/lib/dpkg/lock | |
# Fix dpkg | |
sudo dpkg --configure -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment