How to repair a bad upgrade on Ubuntu!


This week, in our Linux Page (in Spanish) we posted some tips about repairing a bad Linux upgrade.  In fact, it is rare but sometimes, unfortunately, it happens. I mean one or more error during an upgrade installation on Ubuntu. In my case the problem was caused by a blackout and a battery which did not worked properly. When I restarted the PC it worked only in text mode and it asked me the login and the password to enter into the Ubuntu root mode. Obviously, as usual, I typed the requested data and then, after reading how to solve similar problems on internet, I decided to go forward with sudo apt-get update. At this point Ubuntu advised me that something had been wrong during the last update and suggested to try with sudo dpkg –configure -a.  I followed the suggestions and I concluded the “repair session” with  sudo apt-get upgrade –fix-broken. Fifteen minutes later and after rebooting all the “bad upgrade” problems were solved. Recommended! Bookmark this page! mp3 link

21 thoughts on “How to repair a bad upgrade on Ubuntu!

  1. stoptheworldandturnyourself

    i have the latest ubuntu available as of 2/14/12;

    it tells me;

    “E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?”

    Like

    Reply
  2. stoptheworldandturnyourself

    OK, so after going through forums and trying many codes I just rebooted to end all my processes and everything went fine. until sudo apt-get upgrade –fix-broken

    I get;

    error: cannot read from ‘/dev/sda’.

    it hangs and just keeps repeating the error.

    This is the problem i was having when i initially tried installing ubuntu (right now i am just trying to get my wireless driver, ubuntu runs just fine). The harddrive was bad on this laptop so i had to get an external and install it on that. i think it is, for whatever reason, trying to read my bad internal hd. Any help would be great. So far, everything else on ubuntu seems to be fine. But then again, I have barely been using it because I don’t have the wireless driver. right now i am crammed in a corner next to my router lol. Please help if you can.

    Like

    Reply
  3. Zach Darian

    If I try “sudo apt-get upgrade -fix-broken” I get the following error:
    “E: Command line option ‘i’ [from -fix-broken] is not known.”

    I get a similar error with trying the other line you provided…I think this upgrade really screwed something up.

    Like

    Reply
    1. Anonymous

      The line should be “sudo apt-get upgrade –fix-broken”
      Note the second ‘-‘ before the last argument.

      Like

      Reply
      1. David Miceli

        sudo apt-get upgrade –fix-broken is the correct command remember the two dashes before fix or it will not work.

        Like

  4. Anonymous

    Wow, the comment system strips away one of the dashes. No wonder this has been hard to get correct.
    Anyway, there are supposed to be two dashes before the ‘fix-broken’ argument.

    Like

    Reply
  5. Andrea Cammarano

    It is really open-handed of people like you to make without restraint all that a number
    of us could have offered for an e-book to end up making some profit for their own end,
    chiefly given that you could have done it in case you desired.
    These solutions also served to be the great way to realize that other individuals have the same
    fervor similar to my personal own to find out lots more
    in respect of this condition. I’m certain there are some more pleasurable times in the
    future for folks who examine your site.

    Like

    Reply
  6. Migre.Me

    There can be an identical red car ahead of her by two
    blocks before she arrives, yet the chickens just stand there and wait.
    You also need insurance if you are going to borrow a car from someone else.
    Although this is the case, you still need to try a few pairs on and
    maybe even jump around in them, to make sure that they’re not
    too tight in the toe portion.

    Like

    Reply

Leave a comment