I've been messing around on VM's, trying to figure out the best way to secure/ clean Ubuntu, and twice- in all my brilliance- I managed to delete a key component in starting Ubuntu (eg. init) because of false positives on programs like Clamav and Rkhunter. My question is, what types of files should I not delete/watch out for when cleaning my system?

UPDATE: More specifically, what files are crucial to running/starting the system?

  • "Cleaning" the system? How did it get dirty?
    – AlexP
    Jan 13 '17 at 21:55
  • By clean I mean get rid of excess files, malware, etc.
    – Playjoy
    Jan 13 '17 at 21:59

You can safely delete any files in your HOME folder under :

  • Desktop
  • Documents
  • Downloads
  • Music
  • Videos
  • Pictures
  • Public

Any hidden folders are out of the question in your zombie apocalypse.

Besides this folders, everything is used by your Operative system. And the other source of unnecessary data is old package files which can be cleaned automatically with :

sudo apt-get autoremove
  • Only problem is I'm only deleting files not in those directories to try to remove malware/viruses/unneeded programs
    – Playjoy
    Jan 13 '17 at 22:01
  • sudo apt-get autoremove removes unnecessary (old version) deb packages. Do you think you have malware or you are trying to get your round-about it for regular checks ?
    – userDepth
    Jan 13 '17 at 22:05
  • It's possible there is malware (most likely Trojans), and I also want to know because I often get false-positives from Clamav/rkhunter and I want to make sure I'm not deleting important files
    – Playjoy
    Jan 13 '17 at 22:08
  • PUA's are not likely to be malware in my experience but I haven't done much scans since I don't share files regularly. I got PUS on a compiler because it uses some kind of compression and the binary cannot be transparently read.
    – userDepth
    Jan 13 '17 at 22:15

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