2

I wanted to test plasma-desktop so I installed it with:

sudo apt install plasma-desktop

It installed a bunch of packages as expected occupying 417Mb of disk space. I tried the DE for a while and decided to get rid of it, so I ran:

sudo apt purge --autoremove plasma-desktop

This however only removed 174Mb of the original 417Mb. How do I get rid of the rest?

To Do
  • 15,502

2 Answers2

2

Getting inspiration from this answer I opened the /var/log/apt/history.log file, copied the packages that were installed by the plasma-desktop meta package (had to do some cleaning by removing the brackets, commas and :amd64) and then I ran:

sudo apt purge --autoremove looooooong package list pasted from text editor

The remaining ~284Mb of packages are gone and importantly without breaking the system.

To Do
  • 15,502
0

Thank you very much for that great answer.

I copied all the packages and put them into a file (apt-kde-packages), then filtered with the command

for i in $(cat apt-kde-packages); do echo $i | grep -v "(" | grep -v ")" | awk -F ":" '{ print $1 }'; done > apt-list-kde
sudo apt remove $(cat apt-list-kde) -y