Switching desktop environment xfce to kde in kali virtualbox distribution

What have you tried: sudo apt purge --autoremove kali-desktop-xfce

What is the error: Removing essential system-critical packages is not permitted. This might break the system.

I installed the last (2025.1a) virtualbox distribution. Installed and run correctly.
Following your guide “Switching Desktop Environments” I tried to switch from xfce to kde.
Installed successfully the kde environment and reboot starting a plasma X11 session.
When I tried to remove the xfce environment I receive an error message as “Error: Removing essential system-critical packages is not permitted. This might break the system.”
Why? It is a bug? Or it is your guide not updated? it is no more possible to remove xfce environment? Or there is different instructions to run?
Thanks for your attention
Erasmo

That article is from 2023. I have both xfce and KDE on my Kali VM and have not had problems, so presumeably what ever was causing problems in the past has been fixed.

I got the same error as you and just left it, as space is not an issue for me.

Thank you my friend for your attention, but:
of course I seen that the guide article was from 2023. Is for this that I asked for an update.
of course that it is possible to have both xfce and kde in the same time and it is working fine. But my problem is to remove xfce and the question is that if I try to remove xfce (as told in the article above) I receive the error I related and it is not possible to perform the removing xfce.
Then my question is again: “It is no more possible to remove xfce environment? Or there is different instructions to run?”
Thanks to everyone would pay attention to my problem and please try to really understand the question before to generously answer.
Thank you
Erasmo

Your trying to purge files, and some of the same files used by XFCE for X11 are now being used by KDE I’d suspect, did you change your login manager for example?

try just sudo apt remove kali-desktop-xfce

From what I can see, if you install the xfce version of Kali, then xfce is considered one of the key packages and it won’t let you uninstall it, for fear of breaking the system. I just tried it, even in single user mode and it won’t let me uninstall xfce.

Note to self, and to the OP, in future, just install the KDE/Plasma version from the get go.

1 Like

Thanks friends for your attention and your advice.
I had come to your own conclusions. I hoped there was another way to solve the problem. Apparently the 2023 guide was valid then and was not updated for the new releases of distributions for virtualbox.
In conclusion it is impossible to start from the VirtualBox version and therefore I had already decided to create a VM by installing Kali starting from the ISO distribution where, if I remember well (and if nothing has changed) it is possible to decide in the installation phase the Desktop Environment to install and then install KDE natively in a cleaner installation. We will see.
Thanks again

What I used to do is download the KDE/Plasma Kali Live CD/ISO, and then install from that. They don’t seem to be available any more, but you can select which Desktop Environment you want during the installer, so that is the way to go from now.

Good hunting!

Thank you, friend.
Is what I will do in the next days.
Thanks again

1 Like