How to remove Plasma desktop

How to remove Plasma and revert to Xfce? I want to remove the packages but not my customizations.

I tried removing “plasma” but I got this:

sudo pacman -R plasma

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing xdg-desktop-portal-kde breaks dependency 'xdg-desktop-portal-impl' required by xdg-desktop-portal

sudo pacman -R xdg-desktop-portal
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing xdg-desktop-portal breaks dependency 'xdg-desktop-portal' required by flatpak


Okay, so it wasn’t dependency hell after all. I temporarily removed “flatpak”, and then I was able to remove “xdg-desktop-portal”, and then “plasma”.

There is probably a more elegant way to do this?

personally I would have added these two flags to R

-n, --nosave
Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system, the database is checked to see if the
file should be renamed with a .pacsave extension.

-s, --recursive
Remove each target specified including all of their dependencies, provided that (A) they are not required by other packages; and (B) they
were not explicitly installed by the user. This operation is recursive and analogous to a backwards --sync operation, and it helps keep a
clean system without orphans. If you want to omit condition (B), pass this option twice.

:eye: man pacman

But there might be even better way for a clean removal.

1 Like

Use pacman -Rc plasma

This will remove plasma and anything that is getting in the way of it. Just be careful you don’t also remove something you don’t want to. plasma is decently safe but I have seen many people break their DEs by removing gnome which contained networkmanager at one time.

If I am being honest, I have never understood the fascination with -n. Most packages don’t even have anything in the backup array and when they do, why wouldn’t you want to save them. They take up almost no space, are useful to have later and are trivially easy to remove if you ever want to later.

2 Likes

I guess it has just stuck with me once I have picked it up :blush:
and you are so right about

No -n flag for pacman removal in my terminal ever again :sweat_smile:

2 Likes