Home Linux troubleshooting How To Fix “Package operation failed” Error In Ubuntu

How To Fix “Package operation failed” Error In Ubuntu

By sk
Published: Last Updated on 5.3K views

This brief guide explains how to fix "Package operation failed" error in Ubuntu Linux and its derivatives such as Linux Mint, Pop OS and Elementary OS etc.

The other day I was trying to update the Oracle VirtualBox to its latest version on Ubuntu desktop. But the update didn't go well and I end up with following error.

Package operation failed 
The installation or removal of a software package failed.
Package operation failed

Package operation failed

It wasn't the first time I got this kind of error. I have had this error so many times, and I have fixed it too by searching on the Ubuntu forums and Google. But this time I forgot how I solved it in the past. So, I decided to document the procedure, so that someone can use this procedure if they have the same issue.

Well, let me show you how I did it.

I ran the following commands one by one in Terminal:

$ sudo apt-get update
$ sudo apt-get clean
$ sudo apt-get autoremove
$ sudo apt-get update && sudo apt-get upgrade
$ sudo dpkg --configure -a
$ sudo apt-get install -f

When I executed the last command, I got the following error.

[...]
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error - Sub-process /usr/bin/dpkg returned an error code

Error - Sub-process /usr/bin/dpkg returned an error code

Oops! Another error??

However, I opened the Software Updater from the Menu. This time it displayed a message: The update has already been already downloaded.

Ubuntu Software Updater

Ubuntu Software Updater

Cool then. I just hit the Install now button. The installation went good and completed without any issues.

Software Updater

Software Updater

Hope this helps.

You May Also Like

2 comments

Neil September 27, 2015 - 12:54 pm

Hi, I’m glad I found your site, I was looking for a way to track down the double file entries on my hard drives. On your suggestion I installed dupeGuru, thank you. I have a question though, I can’t make the program look at my other hard drives. Is this normal or did I do something wrong? Hope you have an answer. Keep up the good work. Thanks

Reply
Admin September 29, 2015 - 2:03 pm

Hi you have to partition the other hard drive and mount it to the current system where you installed the dupeGuru. Then, scan the mounted partition using dupeGuru.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More