How To Fix “Problem with MergeList /var/lib/apt/lists” Error In Ubuntu 11.04

While using the package manager or trying to install applications through Terminal, it is possible to get a nasty error which is something like this :

E:Encountered a section with no Package: header,

E:Problem with MergeList /var/lib/apt/lists /us.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages,

E:The package lists or status file could not be parsed or opened.

This  will prevent from  installing or upgrading any application in  Ubuntu 11.04.  Fortunately, the fix is simple for this.

From the Terminal type the following commands :

sudo rm /var/lib/apt/lists/* -vf

and

sudo apt-get update

This  will delete the older entries and download the latest ones after which the error should no longer be there.

[ In fact, to avoid remembering these commands, they can be put in a shell script and only that script needs to be executed. Check out this post on how to do that.]

Cheers.

Update : In Linux Mint 15, you can simply fix this using a few clicks. Check out the post here.

80 Comments

  1. I know nothing! says:

    don’t forget to close update manager or you will get an error in your terminal at the end of it and have to start all over :)

  2. Arkmow says:

    Thanks, I was going to try to copy them from another computer using the same distro. i could not find this anywhere else.

  3. sripathi says:

    Thank you
    it’s helped me a lot to solve the issue

  4. mark129 says:

    Dzięki za pomoc, działa wszystko OK :)

  5. juan riveros says:

    muchas gracias excelente consejo problema solucionado

  6. Valene says:

    Thanks! this helped me out.

  7. Michael says:

    Hi im not much of a computer whiz but what is the terminal?

    • Valene says:

      Just open up the menu for your linux build and you will see it listed. The terminal is your black box command line interface, or your CLI where you can input line commands to make your linux desktop preform functions, like move files around, delete files, make new folders, ect.

  8. Rob knol says:

    fixed on a mint linux nada laptop
    thanks!