deleting unnecessary system files

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
homerscousin
Level 5
Level 5
Posts: 531
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

deleting unnecessary system files

Post by homerscousin » Fri May 03, 2013 11:44 pm

There are 4 folders on my /root partition that don't seem to be very useful. I have read a couple web pages suggesting it is safe to delete them- unless you have a particular need for them. They are usr/share/man usr/share/zoneinfo usr/share/locale and usr/share/doc. usr/share/man might be the most useful. Anyway, these 4 folders contain almost 18,000 files most of which are tiny. Has anyone done this? Do you miss any of it? I have already deleted my system wallpapers. It is so much nicer when I right click the desktop to change images and don't see a long list of unwanted thumbnails displayed.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.

User avatar
catweazel
Level 19
Level 19
Posts: 9825
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: deleting unnecessary system files

Post by catweazel » Sat May 04, 2013 12:20 am

http://www.debian.org/doc/debian-policy/ch-docs.html

You decide. Though I think it's madness to delete man pages.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

homerscousin
Level 5
Level 5
Posts: 531
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

Re: deleting unnecessary system files

Post by homerscousin » Thu May 09, 2013 7:20 pm

I did delete zoneinfo, locale and doc. System seems to work as before.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.

User avatar
karashata
Level 4
Level 4
Posts: 439
Joined: Tue May 10, 2011 2:53 pm
Location: Stratford, Ontario, Canada
Contact:

Re: deleting unnecessary system files

Post by karashata » Thu May 09, 2013 8:24 pm

/usr/share/man contains the various man-pages for many of the applications installed on your system. Those are pretty useful for terminal applications as they contain various flags and commands, as well as the proper syntax, that can be passed to the programs to make them perform specific functions.

/usr/share/locales appears to contain installation and removal scripts for language packs. I'm not sure if there's anything else that is supposed to be in there, as I use BleachBit to remove every localization but English from my system.

/usr/share/zoneinfo is timezone information, I would think that would be necessary, no..?

/usr/share/doc appears mostly to be package documentation, such as changelogs and copyright information, not necessarily *needed*, but as the changelogs are GZipped, I don't imagine they take up a whole lot of space... Plus on occasion it might be nice to know what's been changed in a particular package version, assuming the changelog for that package was updated with useful information.

By my estimates, based on the numbers Disk Usage Analyzer has given me for my installation, you might have saved about 136 MB by removing those folders. Assuming there was more in your locales folder than what's currently contained in mine, you may have cleared out significantly more space than I could by removing that particular folder from my system (12.3 kB), however, as I stated, I use BleachBit to remove all of the unnecessary localization stuff on my system.

If you're just looking for ways to free up a little additional space, I might recommend you install BleachBit and run that to remove unnecessary files and such from your system. It's certainly a lot safer than just deleting folders (and their contents) that don't appear to be entirely necessary, and that will reappear again later anyway when applications that put files there are updated (assuming that deleting the folders and contents doesn't break the upgrade process somehow...)
Linux Mint user since 2010, fluffy dragon forever!
Registered Linux User #473695
Image

homerscousin
Level 5
Level 5
Posts: 531
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

Re: deleting unnecessary system files

Post by homerscousin » Sat May 11, 2013 1:45 pm

Freeing up space doesn't matter. I have hundreds of gigs. Sometimes I just get this bug in my head, can't find a great definitive answer, so I try it for myself. I just don't want junk files and folders on my system. Windows had quite a bit. I have Bleachbit installed and run that as user and root occasionally. I also recently ran

Code: Select all

sudo apt-get clean
. That deleted about 400 Mb of stuff I probably won't miss. I'm experimenting. Actually I have deleted a couple other folders in root that did not look useful. I might get a bit more daring after Mint 15 KDE is out and burned to a dvd just to see what I can get away with.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.

User avatar
xenopeek
Level 24
Level 24
Posts: 24182
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: deleting unnecessary system files

Post by xenopeek » Sat May 11, 2013 2:04 pm

Eh? Why would you manually delete system files :( We have a package manager for a reason dude... Please instead if you want to remove system files, check from which package they were installed (dpkg -S /path/to/file) and remove the package if you don't need any of the files from that package (dpkg -L package-name). Keep your system consistent with how your package manager knows it.
Image

User avatar
eanfrid
Level 7
Level 7
Posts: 1859
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: deleting unnecessary system files

Post by eanfrid » Sat May 11, 2013 2:04 pm

If you want to make some cleaning, do not proceed like you did. Use your package managers to remove useless (from your own POV) packages instead of blindly deleting files&folders. You are madly putting aside what package managers are meant for and taking the risk to break packages you didn't even think they would be afterwards.

Anyway you can at least do this:
- do not automatically install "recommended" packages
- [ sudo apt-get autoremove --purge ]
- install and use "deborphan" [ sudo apt-get purge $(deborphan) ]
- install "localepurge" to keep only locales and translations you want on your system
- [ sudo apt-get clean ] to purge the cache of already downloaded and installed packages
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox

homerscousin
Level 5
Level 5
Posts: 531
Joined: Fri May 25, 2012 2:43 pm
Location: Somewhere on planet Earth (mostly)

Re: deleting unnecessary system files

Post by homerscousin » Mon May 13, 2013 10:11 pm

Ok, I promise I will not go nuts with this and I will follow your advice. I just kinda like to tinker like some folks really love to overclock. I've turned off maybe a half dozen services, I turned off Akonadi this weekend, don't need it. My clean boot mem use was 570 Mb back in March. Today it is at 405.
i5 3570k, ASRock z77 Extreme 4, 8 Gb Ripjaws 1600, Antec 430w psu, HVR 1600 tv tuner, custom case- marble top, oak face. Carver & DCM Time Window sound system. Mint 14 KDE.

Post Reply

Return to “Other topics”