This question already has an answer here:

So I installed KDE with task-kde-desktop and ended up not liking it. I tried apt purge task-kde-desktop and noticed the small amount of packages being uninstalled compared to installing it. So I tried apt autoremove task-kde-desktop and it's still a small amount.

How do I uninstall everything task-kde-desktop installs?

I am also on Debian Stable 9


Tried using aptitude like suggested bellow and even KDE is still installed. Didn't work. How can I remove kde and everything that it came with completely?

marked as duplicate by GAD3R, peterh, Philippos, Raphael Ahrens, Stephen Rauch Nov 29 '17 at 14:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • AFAIK apt autoremove actually should deinstall everything pulled in by task-kde-desktop. That said, if you want to try a different way to remove everything pulled in via packages that are no more installed then try apt-get install deborphan && deborphan – Tomáš Pospíšek Nov 28 '17 at 21:47
  • @TomášPospíšek I thought so too, it normally does but I guess not here for some strange reason. I'll give deborphan a try. Do I just run deborphan or do I need to add the package name after it? Edit: – Liam O'Luachra Nov 28 '17 at 22:07
  • @TomášPospíšek Just tried using deborphan with just by running it and it didn;t work. It just listed android-tools-adb and that's it. Didn't uninstall anything, didn;t list anything related to kde. – Liam O'Luachra Nov 28 '17 at 22:13
  • Have a look at man deborphan or rather deborphan --help. It has various grades of aggressiveness of what it proposes to you to deinstall. So be warned. Usually I solve the problem you have with deborphan or in your exact case, I might run aptitude then select and open the task-kde-desktop package there and recursively purge all its dependencies (select-open-purge). Be also warned here: if you delete too much (say libc) then you'll trash your system. Use undo inside aptitude if you've selected to purge too much stuff. – Tomáš Pospíšek Nov 28 '17 at 22:22
  • @TomášPospíšek Honestly should just stop being lazy and backup on a hard drive with dd before doing this sort of stuff. Haha, I'll give aptitude a try, thanks. – Liam O'Luachra Nov 28 '17 at 22:25

The reason not everything is removed is because of the "task" type package. Debian makes packages that follow a set of alternative rules. "This package or that package" in the set of rules. If you have task-desktop installed then you must have at least one desktop to fulfill its dependencies and therefor it won't autoremove. Remove task-desktop to strip dependency on KDE OR install another one of the desktop tasks like task-gnome-desktop.

For example:

apt-get install task-gnome-desktop
apt-get purge task-kde-desktop
  • Ah, thank you. I will keep this in mind if I need to remove a DE again. Thanks :). – Liam O'Luachra Jan 2 '18 at 22:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.