LOCALEPURGE(8)

πŸ’– LOCALEPURGE(8) πŸ’–

okay bestie, so this is the manual page for localepurge β€” it lives in the System Manager's Manual, and it is literally about freeing up disk space by deleting localizations you don't need. let's get into it 🫢


✨ NAME ✨

localepurge β€” reclaim disk space removing unneeded localizations πŸ’…


🌸 SYNOPSIS 🌸

localepurge

πŸ¦‹ DESCRIPTION πŸ¦‹

so localepurge is this little script whose whole personality is recovering disk space that's being wasted on locale files and localized man pages you don't even use. no cap.

and the way it works is so sneaky β€” it gets automagically invoked by dpkg the moment any apt installation run finishes. like it just shows up. uninvited but helpful. πŸ’€

here's the thing though, bestie: you have to tell it what to keep. you do that by defining the locale directory names you want preserved from removal after each apt installation run, inside the /etc/locale.nopurge configuration file. and if localepurge hasn't been adequately configured? then the system's localization files won't be touched at all. it just sits there. respecting boundaries. ✨

the contents of these following directories are the ones that get affected by removals:

  • /usr/share/doc/kde/HTML
  • /usr/share/gnome/help
  • /usr/share/locale
  • /usr/share/man
  • /usr/share/omf
  • /usr/share/tcltk
  • /usr/share/cups/{templates,locale,doc-root}
  • /usr/share/calendar
  • /usr/share/aptitude
  • /usr/share/help/<domain>/HELP_CONTENT(files&dirs)
  • /usr/share/vim/vim*/lang

and the localization files you actually need, the ones you want preserved on your system? super easy to configure, you just run:

dpkg-reconfigure localepurge

slay. that's it. go off. πŸŽ€


πŸ’… OPTIONS πŸ’…

so the configurable options are, like, a whole vibe. they consist of toggling verbose output, reporting a summary of freed space, and deleting localized manual pages in addition to locale files. all of the actions get specified in the /etc/locale.nopurge configuration file. periodt.

for detailed debugging there's a commandline switch, -debug, or you can just use the short -d instead. and for verbose output there's the commandline switch -verbose, or the short -v can be added. pick your fighter. 🌈


⚠️ A Word of CAUTION ⚠️

okay bestie, sit down, we need to talk. πŸ™ˆ

please note that this tool is a hack. it is not integrated with Debian's package management system, and therefore it is not meant for the faint of heart. responsibility for its usage and possible breakage of your system therefore lies in the sysadmin's (your) hands. that's you. it's giving main character energy and the main character is accountable. 😭

please definitely do abstain from reporting any bugs blaming localepurge if you break your system by using it. like, fr fr. if you don't know what you are doing and can't handle any resulting breakage on your own, then please simply don't use it. no shame, just honesty. πŸ’€

and here's the scary part: all locale directories from the affected paths listed above which are either commented out or not even listed at all in /etc/locale.nopurge will be irreversibly deleted. irreversible. gone. the only way to reinstall any lost locales is a complete reinstallation of all the Debian packages containing them. see /usr/share/doc/localepurge/reinstall_debs.sh for a recipe.

alternatively, you can reconfigure it with dpkg-reconfigure(8) to prevent locale files from being purged during subsequent runs of apt. choose wisely. πŸ‘‘

πŸ’€ irreversible means irreversible, bestie. back up your vibes before you back up nothing.

πŸ”§ SOLVING PROBLEMS caused by localepurge πŸ”§

so this program does interfere with the Debian package management, and it does provoke strange β€” but usually harmless β€” behaviour of programs related with apt/dpkg, like dpkg-repack(1), debsums(1), reportbug(1), etc.

if you need to have any package in its full integrity, so that e.g. the formerly mentioned programs work as designed by its author and as expected by you, then simply deinstall localepurge temporarily without purging its configuration, and reinstall the packages you need in their fully integral state. then, when you are done with whatever you needed the integral packages for, simply reinstall localepurge again. it's a whole cycle. a little dance. we love a reversible workaround. 🧚


πŸ“ FILES πŸ“

  • /etc/locale.nopurge

πŸ‘€ SEE ALSO πŸ‘€

administrators of systems with short disk space should have a look at both the deborphan and debfoster packages. especially debfoster can work wonders for your scarce disk space! πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

localepurge and its accompanying manual page was written for the Debian GNU/Linux system by Paul Seelig <pseelig@debian.org> with major contributions from Gustavo Noronha Silva <kov@debian.org>, Francesco PotortΓ¬ and Miguel Figueiredo. legends, all of them. πŸ’œ

the author sincerely hopes that some day further development of Debian's great package management system will make localepurge fully obsolete. iconic sentiment honestly. we stan a humble king. ⭐


and that's the whole page, bestie!! this came from the LOCALEPURGE(8) entry in the System Manager's Manual β€” the version with no extra date stamp on it, just the plain LOCALEPURGE(8) footer chillin' at the bottom. go forth, purge responsibly, and don't blame the script when it does exactly what you told it to. πŸ’–βœ¨πŸŽ€