Is it possible to do
sudo apt-get autoremove
without removing packages in use?
I did an autoremove command and it asked my if i wanted to remove those packages. Since it was a lot of packages i didn't specificly check everyone. Together it was 163mb. After this removal i saw my desktop icons change. I didn't want that to happen since i was using those icons.
I restored those packages from the log file thanks to these commades
echo '#!/bin/bash' > restore
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore
chmod +x restore
./restore
Thanks to https://serverfault.com/questions/380856/how-to-undo-apt-get-remove
- Are there any reason for it to do that or in a different way what are the properties of autoremove?
- Is there a way to chose which packages autoremove does not remove?
Thanks to all responses in advance