#780889 localepurge: does nothing if path-exclude is enabled

#780889#5
Date:
2015-03-20 23:52:35 UTC
From:
To:
If path-exclude is enabled, localepurge effectively does nothing.  In
theory, it would remove locales shipped with eventual packages installed
after it, but in typical usage, localepurge is installed last or close to
last.  Even worse, manually invoking it does nothing too.  In order to
actually purge junk locales, you need to:

dpkg-reconfigure to disable path-exclude
run "localepurge" by hand (on a minimallish system clears 110M)
dpkg-reconfigure AGAIN, with disabled path-exclude
run "localepurge" by hand, to clear another 4M (which it claims you "newly
installed" even though nothing was installed between invocations)
dpkg-reconfigure to enable path-exclude

Only then the option does work as expected.

#780889#10
Date:
2023-05-01 10:58:21 UTC
From:
To:
I recently ran into this problem too.
I have 2 systems where `/usr/share/locale/` used 700+ MB, which I think
is rather excessive, so I installed localepurge to get rid of most of it
... only to find out it didn't do that.

I can also confirm that manually running `localepurge` did nothing
initially as IMO the logical configuration you'd do when installing the
package is to use path-exclude.

Thirdly I can confirm that the workaround works, but it's a bit
complicated and I did it wrong on 1 machine and thereby also removed the
locales for nl* and en*. As I normally run Testing or Sid, I expect
those to be restored when a package upgrade comes in.
People using Stable may not be so 'lucky'.

- -- System Information:
Debian Release: 12.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-8-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages localepurge depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  locales                2.36-9
ii  perl                   5.36.0-7
ii  procps                 2:4.0.3-1
ii  ucf                    3.0043+nmu1

localepurge recommends no packages.

Versions of packages localepurge suggests:
pn  bleachbit  <none>
pn  debfoster  <none>
pn  deborphan  <none>

- -- debconf information:
* localepurge/none_selected: true
* localepurge/nopurge: en, en_US.UTF-8, nl, nl_NL.UTF-8
  localepurge/remove_no:
* localepurge/use-dpkg-feature: true
* localepurge/mandelete: true
  localepurge/dontbothernew: true
  localepurge/verbose: false
  localepurge/showfreedspace: true
  localepurge/quickndirtycalc: false
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCZE+bRAAKCRDXblvOeH7b
bjrMAP9bxORProL77LrtvdrCFKKJvut7rZKlX26WKpfbXClY0gEAtHyPDweBgRDZ
QUV6mcEtf8dvgy3qm7g15bbo7IsHIwg=
=wvJm
-----END PGP SIGNATURE-----