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.