I recently (a day ago) switched from Linux Mint to Debian and tried out several different DEs. I settled on Cinnamon but still have leftover packages and files from Gnome, Plasma, etc. Is there an easy way to remove everything that was installed automatically by a particular DE besides reinstalling Debian with just Cinnamon? Or do i have to go through all my programs manually?
I鈥檝e already removed the DEs i don鈥檛 like with tasksel, and i鈥檝e tried apt autoremove but it doesn鈥檛 remove anything.
If i do have to do this manually, is there a list somewhere of the programs that come with each DE so i know which of the four plain text editors and so on to keep?
After trying a few of these alternative programs, i鈥檝e decided i will go through them manually since i like some that aren鈥檛 from Cinnamon. Solutions are still welcome in case someone else has this same issue.
The desktop environment packages that
taskseluses (task-gnome-desktop,task-kde-desktop, etc) can be found towards the bottom of the list at: https://packages.debian.org/trixie/task-desktop. In theory, you can just uninstall thetask-your-desktoppackage which takes away everything that DE came with. If that doesn鈥檛 work or doesn鈥檛 play well your earlier manual uninstallations, take note of the dependencies that the task packages pulled (including recommendations) and go about uninstalling the dependencies layer by layer.Not sure, but does removing the meta package and then running
apt autoremovework?Nope, that doesn鈥檛 remove anything. 0 upgrading, installing, removing, or not upgrading.
What you can do is pretend to reinstall (鈥搑einstall), download only (-d), for example for xfce4 meta package :
sudo apt-get -d install --reinstall xfce4Then stop it after it shows you which packages it is about and copy and paste all the packages it mentions in a simple file (myfile) and execute that.
For Gnome it could be like this (leaving out a lot of packages to make the example fit on one line) :
sudo apt-get remove --purge baobab chrome-gnome-shell folks-common fonts-cantarell gdm3As you can see do note which display manager you鈥檙e currently using. Executing the file you made can be done with :
bash ./myfile
On Debian Stable by default when apt installs a package it will also install Depends and Recommends. The package can鈥檛 install without Depends so that one is obvious - for Recommends you can check your apt configuration running apt-config dump, it probably has
APT::Install-Recommends "1";meaning those packages get installed too.
Knowing that, you could in theory run apt show PACKAGE-NAME to view each package鈥檚 Depends and Recommends. So for example if you want to look at kde-standard then run
apt show kde-standardWith the above example you could use the information for Depends and Recommends to figure out which packages were installed alongside kde-standard. It would be a bit time consuming but could give you a starting off point.
Also note Debian repos are online on their website. So using the above example for Debian Stable you can view the same kde-standard info at https://packages.debian.org/stable/kde-standard , one idea could be simply to copy all the dep and rec package names and then paste them into a new script to apt remove them all one-by-one (or in one long command).
PS - I鈥檓 a bit surprised apt autoremove doesn鈥檛 fix this for you, that seems to be the point of the command unless I misunderstood its intent :/