I accidentally add a locale, e.g. sudo locale-gen zh\_TW

e.g. locale -a

```
zh_TW

```

But how to remove it?
['https://serverfault.com/questions/394610', 'https://serverfault.com', 'https://serverfault.com/users/50774/']
I think you can do this by editing `/var/lib/locales/supported.d/local` and removing that locale. Then run `locale-gen` to regenerate the compiled locales.
I am unsure why the most Distributions and Users are unaware from [localepurge](https://manpages.ubuntu.com/manpages/kinetic/en/man8/localepurge.8.html)

For Debian based Systems, should it be available by

```bash
apt-get install localepurge

```

From the Manpage:

> 
> localepurge is a small script to recover disk space wasted for unneeded locale files and localized man pages. It will be automagically invoked by dpkg upon completion of any apt installation run.
> 
> 
> 

> 
> You have to define the locale diretory names you want to keep from
> removal after each apt installation run in the /etc/locale.nopurge configuration file. Unless localepurge has been adequately configured, the system's localization files won't be touched at all.
> 
> 
> 

> 
> The contents of following directories will be affected from 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

```

> 
> The localization files you actually need and which you want to be preserved on your system can be easily configured by running the following command:
> 
> 
> 

```
dpkg-reconfigure localepurge

```

Conclusion:
This Script will take care of any unwanted locales at the moment and in the future.