To test and learn I've installed several DEs Plasma, Ubuntu Gnome etc.
Other times, after removing one of them, many packages disappear and the remaining DEs are left almost unusable.
Is there a safe way to remove DEs?
To test and learn I've installed several DEs Plasma, Ubuntu Gnome etc.
Other times, after removing one of them, many packages disappear and the remaining DEs are left almost unusable.
Is there a safe way to remove DEs?
Yes it is safe (my opinion; please read the final caveat at the bottom though!), but I do homework before I remove a desktop.
I'm a lover of multiple DEs & add/remove desktops somewhat regularly (its not common behavior, but I'll do it multiple times usually per six monthly release cycle, which is more than most I suspect) but I'd not write an generic answer for the question as any answer will be release specific.
It'll also depend how much you manually installed and how the desktop was installed (ie. via what meta package) & other factors too. In recent years I stopped adding the desktop (say the xfce
meta package & switched to xubuntu-desktop
which installs more, but I subjectively had less issues on removal)
I look at
apt install -reinstall
will cause that package to be treated as manually installed even if it was dragged in by meta package initially; these can cause parts of the DE to be left behind on removalIt's details like this I explore before I run the apt remove
command. Even then I read the output before I say "y" to it; as I may have missed stuff, also did it report packages were being removed that I expected to be removed; if it doesn't look right I say "n" & explore why.
Note: historically my ISP let me download Ubuntu ISOs quota free; but not flavors; and upgrades & additional package installs were likewise quota free; thus I always installed a Ubuntu Desktop system, and installed/removed desktops as this was quota free; unlike downloading a flavor ISO which used quota..
This explanation isn't likely very easy, but I'm having trouble describing what I look for as I only really scan the output & come up with a feeling that's either "looks good", "something's missing", "not sure", or "no way - wrong!".
Either way I do on occasion have a less than perfect result (ie. "oops; missed that" moment) but within a minute or two I've worked out what was wrong & corrected it, and usually a logout/login proves it; or at worst a restart of the DM or reboot & it's golden again :)
ps: it's not a NEWBIE thing; but in my opinion, it's a great way to learn, as I learnt heaps from doing it, esp. fixing the occasional mess I'd make doing it !
xubuntu-desktop
as an example (even though I'm on other flavor teams..) as I do really like Xfce... As stated, my installs were always Ubuntu Desktop, thus was either GNOME (2), Unity (7), or GNOME (3) where I started.. thus it was the most common I'd remove. though I tended to avoid removing it unless I had to (I find 3 desktops are pretty easy to have co-exist; issues occurring most when on the 4th desktop install... getting to five is rare!) Removing the default GNOME/Unity I found the most problematic; but constant install/remove does get messy with problems
– guiverc
Feb 18 '22 at 10:27
apt-cache depends xubuntu-desktop
to see your current release (I had to pick a release; so I've used my current jammy). I'd look at what I currently had installed; and what I was going to install/remove; quick scan looking for clashes (ie. what maybe problem on install; or shouldn't be removed if that's what I want), or to give me a guide on what I should see installed/removed etc
– guiverc
Feb 18 '22 at 11:33
apt-cache depends
type enquiries) more than I do now, these days it's just a scan, as I don't expect problems OR if I have a problem because I scanned too quickly; I believe I can fix anything super quick. I have test boxes I'd likely use if I wanted to experiment (I'm involved in QA-testing; did 3 installs today - so I have systems I can play if I think necessary), but that would be rare.. At last resort; a re-install is super fast and can be done without losing data or your configs anyway
– guiverc
Feb 18 '22 at 11:38
apt install -reinstall
will cause that package to be manually installed even if it was dragged in by meta package which will cause part of the DE to be left behind etc). It's details like this I explore before I run theapt remove
command.. Even then I read the output before I say "y" to it; as I may have missed stuff, but am I seeing what I expected... – guiverc Feb 17 '22 at 22:10