---
name: "locale-gen"
section: "8"
platform: "linux"
package: "locales"
version: "2.41-12+deb13u4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/locale-gen"
---

# locale-gen(8)

generate localisation files from templates

## NAME

**locale-gen** – generate localisation files from templates

## SYNOPSIS

**locale-gen** \[**--keep-existing**\]

## DESCRIPTION

As compiled locales are large, only templates are distributed in the default **locales** package, and only the desired locales are compiled on the target system.

After selecting the locales into */etc/locale.gen* (via **dpkg** package configuration, for example), **locale-gen** is run to compile them via [localedef(1)](/localedef/1.md).

## OPTIONS

- **--keep-existing**

  Do not remove */usr/lib/locale/locale-archive*, only compiling new locales.

## FILES

- */etc/locale.gen*

  Whitespace-separated newline-delimited *locale* *charset* list of locales to build with # start-of-line comments.

## SEE ALSO

[locale(1)](/locale/1.md), [localedef(1)](/localedef/1.md), [locale.gen(5)](/locale.gen/5.md)

*/usr/share/i18n/SUPPORTED* (*/usr/local/share/i18n/SUPPORTED*) — list of all supported locales on the current system.

The **locales-all** package, which contains all supported locales in compiled form.
