topic title: Clean the Detritus with BleachBit
5 posts
• Page 1 of 1
-
Posts: 127
- Joined: 05 Dec 2014
#1
Did you know that if you run BleachBit as superuser and select the option to remove language files, you can delete probably megabytes of files from your hard drive? You cannot do this running BleachBit as a regular user though. You should get in the habit of running BleachBit as superuser prior to shutting down your PC if you have performed any installs or updates during your session. Get cleaning... __{{emoticon}}__
-
Posts: 1,445
- Joined: 09 Feb 2012
#2
Since you are interested in cleaning language files, check it out:
bleachbit + bleachbit (as root) + localepurge
will typically miss 20Mb+ worth of unused language files on a typical debian-derived desktop system.
To hunt for these, open a root-permissioned terminal and run updatedb followed by
locate zh
( zh_ is a pattern common to Chinese locale files )
localepurge is terribly outdated, and is incomplete in terms of the paths it scans
( usr/sbin/localepurge is a bash script, can examine it in text editor )
usr/share/locale
usr/share/man
usr/share/gnome/help
usr/share/omf
usr/share/doc/kde/HTM
From memory, one biggie is the path perl5.18/Unicode/locales
??? usr/share/i18n
because with it absent you'll wind up with iceweasel displaying"rectangle placeholders" for unicode chars.
===================================
separate from language files, here are some cleanup targets:
$ cd usr/share
$ ncdu
you'll find many Mb of additional cleanable items. For instance, one of the themes (Adwaita?) installs huge wallpaper images that you'll probably never care to use.
If you want to take an especially harsh/extreme approach to cleaning (like I do), consider nixing any 64x64... 128x128 subdirectories pathed under each iconset.
Personally, I nix all larger than 32x32 and leave the rest (diminishing returns).
I also delete the iconcache files (for gnome iconset, this file may be 60Mb+) but ...YMMV
====================================
My cleanup script has grown to 1000+ lines, but many of its targets aren't present in antix (by default, as shipped)
so I'll just paste snippets for a couple of the more generic target items
bleachbit + bleachbit (as root) + localepurge
will typically miss 20Mb+ worth of unused language files on a typical debian-derived desktop system.
To hunt for these, open a root-permissioned terminal and run updatedb followed by
locate zh
( zh_ is a pattern common to Chinese locale files )
localepurge is terribly outdated, and is incomplete in terms of the paths it scans
( usr/sbin/localepurge is a bash script, can examine it in text editor )
usr/share/locale
usr/share/man
usr/share/gnome/help
usr/share/omf
usr/share/doc/kde/HTM
From memory, one biggie is the path perl5.18/Unicode/locales
(also from foggy memory) One of the paths fleshed out by using"locate zh" should not be disturbed# ^^^^^^^^^^ 5.5Mb as seen in antix 13.1 Full
rm /usr/share/luckybackup/translations/luckybackup_[^e][^n]*
# ^^^^^^^^^^ 4.3Mb as seen in antixFull
rm -Rf /usr/share/vim/vim*/lang/*
??? usr/share/i18n
because with it absent you'll wind up with iceweasel displaying"rectangle placeholders" for unicode chars.
===================================
separate from language files, here are some cleanup targets:
# v--- these will be autogenerated at next browser launch, if absent
# from the outset (new install, browser not yet launched) 17Mb /skel cruft + 13Mb+ per user
rm /etc/skel/.mozilla/firefox/*.default/places.sqlite
rm /etc/skel/.mozilla/firefox/*.default/cookies.sqlite
rm /etc/skel/.mozilla/firefox/*.default/downloads.sqlite
rm /etc/skel/.mozilla/firefox/*.default/formhistory.sqlite
rm /etc/skel/.mozilla/firefox/*.default/webappsstore.sqlite
rm /etc/skel/.mozilla/firefox/*.default/signons.sqlite
rm /etc/skel/.mozilla/firefox/*.default/startupCache/*
rm -Rf /etc/skel/.mozilla/firefox/*.default/thumbnails/*
rm -Rf /etc/skel/.mozilla/firefox/*.default/safebrowsing/*
# ^--- this 17Mb is NOT a comprehensive list of"what all" may be safely excluded
# but it's better than complete inattention to this cruft ( ala debian mozilla packagers + remastersys )
# note: bleachbit"vacuums" places.sqlite ...and the resulting file is still 10Mb (size on disk) (i suspect they're highly compressable for squashfs)
# v--- these will be autogenerated at next browser launch, if absent
rm /home/*/.mozilla/firefox/*.default/cookies.sqlite
rm /home/*/.mozilla/firefox/*.default/places.sqlite
rm /home/*/.mozilla/firefox/*.default/signons.sqlite
rm /home/*/.mozilla/firefox/*.default/formhistory.sqlite
# ^---- reflects my choice. Other user may wish to preserve signons+formhistory
If you run the ncurses ncdu utility##### USERS WHO CREATE MULTIPLE BROWSER PROFILES... WIND UP MULTIPLY-CRUFTED #####
# /home/*/.mozilla/plugins/libflashplayer.so 18Mb per user
# /etc/skel/.mozilla/plugins/libflasplayer.so 18Mb
# ^------ placing ONE instance pathed within /usr/local/share
# and symlinks to it @ home and /etc will free at least 18Mb
# THIS IS A REMASTERING DESIGN CONSIDERATION, NOT A CLEANUP ITEM
# typically 2Mb or more
# note: separate patterns are required to handle the similarly-named
#"adblockPlus","adblockEdge"... browser addons
rm /home/*/.mozilla/firefox/*.default/adblockedge/patterns-backup*
rm /home/*/.mozilla/firefox/*.default/adblockplus/patterns-backup*.ini
#rm /home/*/.aMule/Temp/* #======= important when remastering. These placeholders for partially-downloaded torrents can be HUGE
#rm /home/*/.aMule/logfil*
# ==== CONSIDER: MIGHT /root -PATHED ANALOGUES OF EACH THESE MAY ALSO EXIST
# also bear in mind that these may fail if script is run on a case-sensitive fs system in which"/Home" (capital H) is used as the dirname
rm /home/*/.cache/audacious/thumbs/*
rm /home/*/.config/audacious/log
# even when a kde-core is not installed... a K-native app may be (and may write to these paths)
rm -Rf /home/*/.kde/cache-*/*
rm -Rf /home/*/.kde/tmp-*/*
rm -Rf /root/.kde/cache-*/*
rm -Rf /root/.kde/tmp-*/*
# 11Mb ===UNTESTED=== dunno whether this is a required file
rm /var/cache/cups/ppds.dat
$ cd usr/share
$ ncdu
you'll find many Mb of additional cleanable items. For instance, one of the themes (Adwaita?) installs huge wallpaper images that you'll probably never care to use.
If you want to take an especially harsh/extreme approach to cleaning (like I do), consider nixing any 64x64... 128x128 subdirectories pathed under each iconset.
Personally, I nix all larger than 32x32 and leave the rest (diminishing returns).
I also delete the iconcache files (for gnome iconset, this file may be 60Mb+) but ...YMMV
====================================
My cleanup script has grown to 1000+ lines, but many of its targets aren't present in antix (by default, as shipped)
so I'll just paste snippets for a couple of the more generic target items
# terms of various licenses (GPL, Apache, OSL, etc)
# demand inclusion of"stuffs" for each item
# each time it is DISTRIBUTED.
# Once installed to your system, nothing demands
# keeping useless (to you)"stuffs" on your system,
# nor copying 'em (thousands!) to each
# backup/snapshot fileset you create.
#
# === IMPORTANT ===
# MUST cd TO THE APPROPRIATE WORKING DIR
# PRIOR TO ANY"find...rm" OPERATION
# TO LIMIT THE TARGET SCOPE
cd /usr/share/doc
find -iname AUTHORS -exec rm {} \;
find -iname COPYING -exec rm {} \;
find -iname COPYRIGHT -exec rm {} \;
find -iname LICENSE -exec rm {} \;
find -iname THANKS -exec rm {} \;
find -iname THANKS.gz -exec rm {} \;
find -iname CONTRIBUTORS -exec rm {} \;
# above reflects my personal preference to retain changelogs, READMEs, etc
#
# TIP: do not edit/save notes inside files
# residing in the"doc" path.
# These files WILL (regardless of chmod) be overwritten
# when dpkg upgrades the associated package.
# if the option"save downloaded package file"
# is checkmarked in synaptic preferences
# the *.deb files are stored to this path.
# During non-incremental backup/copy operations,
# this represents a HUGE potential source of bloat.
# OUTCOMMENT THE FOLLOWING LINE IF YOU
# DO, IN FACT, WISH TO PRESERVE ANY"ARCHIVED" deb packagefiles
rm -Rf /var/cache/apt/archives/*
-
Posts: 127
- Joined: 05 Dec 2014
#3
Wow, that's quite extensive. Maybe I'll just reference your post and send an email to the BleachBit developer(s). It would be nice to remove all unnecessary cruft with one program instead of having to use a separate user script to take care of the leftovers.
-
Posts: 1,445
- Joined: 09 Feb 2012
#4
bleachbit author has been responsive to requests but he is a sole inidividual (not multiple people)
and gets overwhelmed, continually putting out fires, supporting multiple platforms.
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://bugs.launchpad.net/bleachbit"
linktext was:"https://bugs.launchpad.net/bleachbit"
====================================
So, unless you submit something bundled as a plugin, don't hold your breath waiting for it to be added.
That's only possible if you roll up your sleeves and examine what's on YOUR system.It would be nice to remove all unnecessary cruft
bleachbit author has been responsive to requests but he is a sole inidividual (not multiple people)
and gets overwhelmed, continually putting out fires, supporting multiple platforms.
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://bugs.launchpad.net/bleachbit"
linktext was:"https://bugs.launchpad.net/bleachbit"
====================================
So, unless you submit something bundled as a plugin, don't hold your breath waiting for it to be added.
-
Posts: 127
- Joined: 05 Dec 2014
#5
@skidoo: I am, but it's a slow process. I much prefer just to use my system than to tinker with it. Playing around with other distros has helped.