0

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

sudo add-apt-repository ppa:elementary-os/daily
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)

6
  • I don't know the effect your what you did and haven't looked. But apt and package tools upgrade to the latest package automatically, which allows downstream/3rd party sources to replace the Ubuntu packages so easily. The package tools don't go backwards though automatically; backups do that. PPA's are 3rd party, so no checks are done by Ubuntu/Canonical; all checks should be done by your before adding to access the effects to your system (or use backups). (ie. it's an intentional one-way upgrade; 3rd parties just report later even if it's the same ver as official to ensure upgrade)
    – guiverc
    Sep 6, 2020 at 7:56
  • 5
    Does this answer your question? Difference between "ppa-purge" and "add-apt-repository -r"?
    – guiverc
    Sep 6, 2020 at 7:58
  • I don't know about elementaryOS' PPA but here is an answer by System76's employee. I assume that is the case with eOS as well.
    – Kulfy
    Sep 6, 2020 at 8:08
  • @Kulfy Thanks for your helpful link. I did not know that adding PPA's is so dangerous. I thought about them as a source for software packages, but apparently they can replace system parts as well.
    – lnxfan
    Sep 6, 2020 at 9:06
  • In theory APT installs latest version of the package available. Look out if the PPA/repository you're going to add offers packages that may replace the versions offered by official repositories.
    – Kulfy
    Sep 6, 2020 at 9:13

1 Answer 1

2

In theory APT installs latest version of the package available. When I add ppa:elementary-os/os-patches in my 20.04.1 system, I'd be getting "updates" for following packages:

base-files/focal 11ubuntu5.2+elementary9~ubuntu20.04.1 amd64 [upgradable from: 11ubuntu5.2]
gir1.2-gtksource-4/focal 4.6.0-1+elementary2~ubuntu6.0.1 amd64 [upgradable from: 4.6.0-1]
libgtksourceview-4-0/focal 4.6.0-1+elementary2~ubuntu6.0.1 amd64 [upgradable from: 4.6.0-1]
libgtksourceview-4-common/focal,focal 4.6.0-1+elementary2~ubuntu6.0.1 all [upgradable from: 4.6.0-1]
lsb-base/focal,focal 11.1.0ubuntu2+elementary2~ubuntu6.0.1 all [upgradable from: 11.1.0ubuntu2]
lsb-release/focal,focal 11.1.0ubuntu2+elementary2~ubuntu6.0.1 all [upgradable from: 11.1.0ubuntu2]

This packages are essential for elementaryOS and the repository's description itself states:

elementary OS specific patches

This PPA is essentially required by elementary OS

Though not mentioned or warned, this repository may mix up packages on Ubuntu.

A similar mess and mixup can also be caused if you use Pop!_OS' PPA. So, whenever you add PPA/repository, look out for the packages they offer. See if those packages are distro specific and would replace the official packages, don't use it and if you use, don't upgrade or dist-upgrade the system. Your system may report other distribution (for example, Updated Ubuntu 16.04, now I'm running Kali?) and even break the system horribly and would land in dependency hell (for example, if you use Kali or Debian repository).

Now coming to your questions:

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

Yes. dist-upgrade alone shouldn't be blamed. The combination with that PPA should be held responsible.

I don't know what has been changed but I can say above packages would have been surely replaced.

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)

ppa-purge is the best way if you don't want to clean install the system. If it fails, you've to do work, a lot of work, i.e., manually check all packages the replace with the official ones. You can always check which package provide "that" file using

dpkg -S file

and check if you can install (or "downgrade") the official packages without breaking other packages.

2
  • 1
    Excellent answer Kulfy :)
    – guiverc
    Sep 6, 2020 at 10:10
  • @Kulfy Great Answer! Wish I knew this earlier. As a current postmortem: Since I manually deleted the etc/apt/sources.list.d files, I added the ppa's again and now used ppa-purge to remove them. I saw the downgrade of the packages to the Ubuntu ones and it offered to revert some of the settings (like /etc/issues) I did already manually. I accepted the offer to downgrade to the maintainers version.
    – lnxfan
    Sep 6, 2020 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .