Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active August 17, 2023 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plembo/d08bbebf17a1d3a151cfff4ea9935cd9 to your computer and use it in GitHub Desktop.
Save plembo/d08bbebf17a1d3a151cfff4ea9935cd9 to your computer and use it in GitHub Desktop.
Ubuntu error on apt update: Package header, MergeList

Ubuntu Error on apt update: Package header, MergeList

Thanks to Amr, I didn't have to rebuild my system the other day. AmrAbdeen. "Fix| Error E:Encountered a section with no Package: header, E:Problem with MergeList". GitHub Gist, 21 Nov 2015, https://gist.github.com/AmrAbdeen/59d688b3d4cf20cc81f2.

Doing an apt update on my house Ubuntu Server 22.04 LTS, I kept getting this error:

Error “E:Encountered a section with no Package: header, E:Problem with MergeList …….”

Trawled the internets for advice, none of it worked, at least one suggestion was pretty clearly dangerous (as in system-crippling dangerous).

Lucked out when I found Amr's gist above, that worked beautifully for me.

These are his steps:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge
sudo apt-get autoremove -y
sudo rm -fv /var/lib/apt/lists/*
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo reboot

Voila!

Came this (thumb and forefinger a centimeter apart) close to reformatting and installing Debian. Another golden opportunity wasted, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment