How to fix “dpkg was interrupted, you must manually run sudo dpkg –configure -a to correct the problem” error.
Whether you are a beginner or a pro, if you have been using Linux or Nginx for WordPress then it may be common to see the error when you try to install apt-get or using apt or doing just a Yum Update. And believe me, it can be very frustrating when it occurs as you are restricted to install or update your software packages on WordPress using Linux. Now, this error can occur for anyone and is not only restricted to some of you using Amazon EC2, AWS Lightsail, or your traditional LAMP or XAMPP.
Don’t worry, we have got you covered. Just run the following commands and tada!
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
cd /var/lib/dpkg/updates
sudo rm *
sudo apt-get update
If the above is helpful, please leave us your feedback in comments that keeps us motivated.
If the error prevails, feel free to email us or post a comment below for future issues.
Bonus
You can also check any processes running such as apt or apt-get. Kill those processes and then continue with your update or install.
ps aux | grep apt
Change the name of service from apt to whatever process you want to know like chrome or apt-get
To kill the process
sudo kill -9 ID
Replace ID with the ID shown in the processes. You can also use sudo killallcommand.
Thanks for your support.
It Worked! Thanks a Lot!
Glad that it helped.
Please follow us on Instagram for more updates in our stories.
it worked thanks
Thank you. Follow us on Instagram for more https://www.instagram.com/brandviser/
It’s working, I am so thankful
Thank you. Follow us on Instagram for more https://www.instagram.com/brandviser/
Yes, problem fixed. Thank you.
Thank you. Follow us on Instagram for more https://www.instagram.com/brandviser/
thanks bhaiya for this ,it just saved my day
Thank you. Follow us on Instagram for more https://www.instagram.com/brandviser/
thanks bro
Thank you. Follow us on Instagram for more https://www.instagram.com/brandviser/
thank you it works as magic
Thank you. Please follow us on Instagram https://www.instagram.com/brandviser/
Works perfectly well. Thank you so much.
Worked. Thanks a lot.)))
Hi!
It works!!!!
Thank you it helped a lot!
Don’t work. I see it after trying update:
I: Set the RESUME variable to override this
and all stoped
See my emailed plain text document (it is very long) sent to your company address.
Your above solution worked, when others failed, but I was trying to do
something unusual and had more problems. I think I should share my added solution.
See emailed:
WK_Email_To_Shivam_Sagar_Brandviser_My_Extra_Fixes_how-to-fix-dpkg-was-interrupted-error-linux_2022-07-11.txt
No SPAM please.
Kind Regards, Wally
Everything is working fine. Thank you! All the best!
thanks it worked
Thanks So Much
Thank you very much..
Saved a lot of time.
Can you please also share the reason why and when can we get this error. And how this solution solves the error.
Thank you
Hi Aditya,
Thank you for your feedback. Sure we will write when and why this error originates.
Working as of August 2023! Thank you so much. This was the most straightforward article I’ve ever read, you deserve a raise.
This resolved my issue. Thanks.
Thank you very much..
Saved a lot of time and helpful
Thanks A ton Its a Saver Thanks Really appreciated . .
this does not work is keeps saying “no such file or dicanary
Please try and check for typos. Or try as a super user.
After my VM crashed during an update I got this error.
Your solution saved my day.
Thanks very much.
At your position, take a coffee or a beer, it’s for me.
i am using kali linux on windows via wsl. after running sudo apt upgrade command it stops or hovers at a single line ( Setting up libc6:amd64 (2.37-15) … ). I tried everything possible as much as I can, hope you can help me with this….
Thank you very much, this worked! 👍
It worked! Thanks guys!
It worked! Thanks dude