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.

  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!

  9. gabriele says:

    thanks a lot, worked fine!

  10. Marco Antonio says:

    Thank you very much, you saved my life! Great post, thank goodness there are people like you on the web. Please keep up the good work. Best regards.

  11. Artur says:

    Hey dude, thank you…

  12. yudhaejr says:

    thanks alot its work..

  13. mauro says:

    Tks so much! easy and quick!
    bests

  14. Heike Funk says:

    solved the Thanks this solved the problem 🙂

  15. freddong353 says:

    great!! thank you very much, it works for me on ubuntu 12.04 behind goagent

  16. yangyang says:

    非常感谢,在你这里解决了我的问题。
    Very thanks !

  17. nada sadki says:

    i tried every commands but i have the same erreur ,lorsque je tape sudo apt-get update ,please help me
    Lecture des listes de paquets… Erreur !
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/dz.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
    E: Les listes de paquets ou le fichier « status » ne peuvent être analysés ou lus.

  18. Works very good. Nice fixing..

  19. Evan Wiranatha says:

    Thanks, It worked, two thumbs up and…. you rock

  20. Fixxxer says:

    If you are going through a proxy you may need to add this setting to apt.conf:

    cat /etc/apt/apt.conf.d/42borked-proxy
    Acquire::http::Pipeline-Depth “0”;

    • Jacob Godin says:

      This fixed my issue with apt-cacher:
      E: Could not open file /var/lib/apt/lists/x.x.x.x:3142_archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-i386_Packages.IndexDiff – open (2: No such file or directory)

  21. Giovanni says:

    Wonderful! It worked instantly. Thanks for this tip. Peace.

  22. admin says:

    @Mahesh :

    You may want to try downloading kile and untar it just to check if it is related to that application only :

    http://kile.sourceforge.net/download.php

    Alternatively, try cleaning and redownloading the repository :
    sudo rm -rf /var/lib/dpkg/updates/*
    sudo rm -rf /var/lib/apt/lists
    sudo mkdir /var/lib/apt/lists
    sudo mkdir /var/lib/apt/lists/partial
    sudo apt-get clean
    sudo apt-get update
    sudo dpkg –clear-avail
    sudo dpkg –configure -a
    sudo apt-get install -f
    sudo apt-get update
    sudo apt-get dist-upgrade

  23. Mahesh says:

    While trying to install kile in Ubuntu 11.10, I am getting the following error message

    Reading package lists… Error!
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.

    I have tried the two commands you have listed. For sudo apt-get update I am getting an error message

    W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/oneiric/universe/binary-amd64/Packages 404 Not Found
    W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/oneiric/universe/binary-i386/Packages 404 Not Found
    E: Some index files failed to download. They have been ignored, or old ones used instead.

    The sudo apt-get install command still gives error. Can you please help me solve this.

  24. admin says:

    William – You may want to try removing the old packages using apt-get remove, then remove the repository lists and run a fresh apt-get update to get the updates.

    Cheers.

  25. William says:

    I actually am somewhat confused I have this same problem with the Dynamic MMap running out of room, and there being a problem/error with a MergeList /var/lib/apt/lists/updates.repository.backtrack-linux.org_dists_revolution_main_binary-i386_Packages However of course my system is Backtrack 4 R2/Linux/32-bit. I’ve been trying to upgrade my Mozilla Firefox to version 10.0.2 and I wanted to have the latest Adobe Flash Player which is alot harder. Anyways I have found problems with other things such as Synaptics doesn’t want to open and crashes upon trying to do so, so it really seems to me like all my “apt-get upgrade” commands or download managers are messed up. Any idea where to begin? Please? Thank you.

  26. Maratha says:

    Hey..

    Really Thanks for sharing this best solution.. its works for me and happy while writing this reply.. Thanks once again..

  27. icofriend says:

    Thanks for the solution. So very good

  28. Lars says:

    Thanks. It worked!

  29. Elizer says:

    Gracias, fue de mucha ayuda… casi desisto de usar este sistema operativo… el error que se genero fue a causa de que yo necesitaba loguearme por un hostpot y ¿no se como lo habia configurado al inicio de la instalacion? pero paso sin login y cargo sus actualizaciones en la instalacion.. despues quedo registrado asi y no funcionaba ien el update.

  30. Uranela says:

    I realised I made a horrible mistake. Namely, I managed to oversee that you are talking about 11.04, and my problem is in 10.10. 🙁 Anyway, do you have any ideas how I might solve it?

  31. Uranela says:

    I see that many people have similar problems with this version of Ubuntu. I tried what you suggested, but it didn’t do the job. This is my problem: reading of the update package stops at 4%, and will not continue. I tried all the things you said (yes, including sudo rm /var/lib/apt/lists/* -vf, sudo apt-get clean, sudo apt-get update) and it won’t help. This is the error message I get:

    Reading package lists… Error!
    E: Malformed 3rd word in the Status line
    E: Error occurred while processing lksctp-tools (UsePackage1)
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.

    Anyone, help?

  32. Mac says:

    I am working on Ubuntu from the last one year and I found it to be wonderful. I never faced this error but my friend faced it while installing applications through terminal. Thanks this post helped him come out of it!

  33. Joshua says:

    THIS :: >> W: GPG error: http://security.ubuntu.com natty-security InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://archive.canonical.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://extras.ubuntu.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://us.archive.ubuntu.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    and also
    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.
    E: _cache->open() failed, please report.

  34. Joshua says:

    ok i’v tried this on ubuntu natty 11.04 but it doesn’t work.. im tryin to install vlc media player but wen it tries to update , half the files are not found and der are decoder errors then it tells me status files could not be parsed or open.. can u give ne other advice .. what exactly is causing this error.. does it have to do with the operating system i.e is it a bug or is this a network problem i.e blocked server or router.. thank you for ur speedy reply..

  35. Beneschk says:

    This has not worked for me so far, I had trouble installing mediabuntu… the servers were stuffed. After solving this problem i now cant use the software center because of this error. now when i do these commands, it does the job, but since mediabuntu cant connect again, it uses the old source which is the broken one… how would i fix this?

    • Beneschk says:

      I actually fixed my own problem, if anyone else has this problem open up your terminal and press alt+F2 then type gksu gedit /etc/apt/sources.list
      once in this file find the text for the mediabuntu or whatever source creating this error and delete that text. save the document and return to terminal. then type
      sudo aptitude update

      Should be all fixed

  36. Jesmag2381 says:

    WORKS LIKE PERFECT!! THANKS FOR THE HELP….

  37. Claudio leturia says:

    Después deinstalar ubuntu lo que menos esperaba es que no aparezca la terminal y que me diese este bug. Gracias a tu aporte se estan instalandolos repositorios en forma correcta. ¡Muchas gracias! desde la Isla de Tierra del fuego antártida e Islas Malvinas,
    [After ubuntu deinstalar the least expected is that the terminal does not appear to give me this bug. Thanks to your contribution repositories are being installed correctly.Thank you! from the island of Tierra del Fuego Antarctica and Falkland Islands,]

  38. rijaalfa says:

    nice, it’s work on me. thanks.

  39. Brandon Garcia says:

    Great information it really helps actually, I’ve been looking for some information in fixing this kind of errors and good thing to be here. Thanks for this great contribution.

  40. Kiran says:

    Thanks for your quick response.
    But, I am still struggling. I am a novice who doesn’t understand much of this installation stuff.

    I tried doing update as you indicated; it worked partially.. there were lot of “Page not found” messages, such as follows-

    “Err http://security.ubuntu.com jaunty-security/main Packages
    404 Not Found [IP: 91.189.92.166 80]”

    Then, I ran –
    sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome

    This gave following output –

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package vim is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package vim has no installation candidate

    I think I am missing something here.
    Thanks in advance.

  41. admin says:

    Kiran – You may want to try first running only the sudo apt-get update command to fetch updated list. Then run :
    sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome

    Cheers.

  42. Kiran says:

    I am getting a similar issue –
    I use following to install vim:
    sudo apt-get build-dep vim-full

    ..and get error message as follows –
    E: Could not open file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_jaunty_main_source_Sources: – open (2 No such file or directory)

    I tried your solution; that didn’t work. Help appreciated.

  43. Manjunath says:

    Thanku its working

  44. Pradeep says:

    God bless you.

  45. John Lindsey says:

    This worked great. Thanks!!!!!!!!!!!!!!!!!!!

  46. vinod says:

    Thank u very much !!

  47. evanp says:

    wow thankyou! it works!

  48. NIke says:

    Niiiiice ..
    thank you… bookmarked!

  49. Dattatray Gund says:

    Thank You…..!!! I recover my o.s. problem using above instruction…It was most helpful for me…

  50. Chris says:

    Thanks so much!

  51. DeadMan says:

    Thanks so much.
    it works for me but after installing some packages the error came back!!!

  52. steampack26 says:

    works great. thank you…you are the gentlemen of scholar!

  53. Tharindu says:

    Nice, This work for me, Thanks

  54. Ben says:

    WOW works perfect Thanks

  55. Aras says:

    worked for me as well. thanks a lot!

  56. glenn says:

    Thank you, Worked like a charm!

  57. ahag says:

    Thanks, worked for me toooooo!

  58. davido says:

    I put it in and I can then successfully install one thing. After that it comes back.

  59. gerber says:

    thank you , very good works fine, the only thing i dont know what happens

  60. alldine says:

    working 100%, thanks dude… you safe my ubuntu life.. 🙂

  61. Aku says:

    Finally! I have been looking for the solution for this problem for what seemed like days! Thanks!

  62. zethy says:

    Thanks, worked for me!

  63. ben says:

    THX a lot! I was thinking of doing this but i was septic of the real need of these files…

  64. Raja Mahesh Kumar says:

    It work fine tyvm

  65. admin says:

    headr – What’s the error you see after running the commands mentioned ?

  66. headr says:

    i try many times.but it still wont work 🙁

  67. admin says:

    Mike – You are welcome and yes please stay tuned for lots of upcoming cool stuff here. 🙂

  68. Mike says:

    Worked like a charm!!!

    Thank you for this.

    BTW : You have some awesome Linux articles for beginners, pls continue doing that for newbies like me.