package management – How to restore update settings after accidently changing it with dist upgrage and pantheon desktop environment


I wanted to try out pantheon desktop in Ubuntu 20.04. I ran:

sudo add-apt-repository ppa:elementary-os/os-patches
sudo apt update
sudo apt dist-upgrade

I changed my mind, but I discovered that software-properties-gtk no longer worked, so I couldn’t remove the ppas via the UI. I removed them manually in /etc/apt/sources.list.d (also tried add-apt-repository --remove and ppa-purge)

Still software-properties-gtk was not working, until I manually fixed /etc/lsb-release and /etc/os-release by replacing the text mentioning elementary with the Ubuntu parts.

Right now most seems to be working again.

My two questions:

(1) What exactly caused my mess (I guess sudo apt dist-upgrade is to blame) and what has been changed (like /etc/lsb-release)?

(2) Is there a way (beside reinstalling) to cleanup the issues completely? (I just saw that files like /etc/issue and /etc/issue.net are also changed)