|
Knowledgebase
EnterprisePlatform
PlatformAPIReact (MCP)CLI
IntegrationsReact (Lingo Compiler)
Alpha
GuidesChangelog

Lingo.dev CLI

  • How it works
  • Setup
  • Quick Start

Configuration

  • Supported Formats
  • i18n.json
  • i18n.lock
  • Supported Locales

Features

  • Existing Translations
  • Adding Languages
  • Overrides
  • Translator Notes
  • Translation Keys
  • Key Renaming
  • Key Locking
  • Key Ignoring
  • Key Preserving
  • Extract Keys with AI

Performance

  • Large Projects
  • Parallel Processing

Retranslation

  • Automatic Retranslation
  • Retranslation
  • Remove Translations

Remove Translations

Max PrilutskiyMax Prilutskiy·Updated about 1 month ago·1 min read

The purge command removes translations from target files based on specific criteria - bucket type, file pattern, key, or locale. It updates the i18n.lock file to reflect the removal.

Usage#

bash
npx lingo.dev@latest purge [options]

Options#

OptionDescriptionExample
--bucket <type>Remove translations in a specific bucket. Repeatable.--bucket json
--file <pattern>Remove translations in files matching a glob pattern.--file src/**/*.json
--key <key>Remove a specific translation key. Supports glob patterns.--key app.title
--locale <code>Remove translations for a specific locale. Repeatable.--locale fr --locale de
--yes-reallySkip the interactive confirmation prompt.--yes-really

Examples#

Remove a specific key#

bash
npx lingo.dev@latest purge --key app.title

Removes app.title from all target files and the lockfile.

Remove all translations in a bucket#

bash
npx lingo.dev@latest purge --bucket json

Remove translations for specific locales#

bash
npx lingo.dev@latest purge --locale fr --locale de

Remove by file pattern#

bash
npx lingo.dev@latest purge --file src/**/*.json

Skip confirmation#

bash
npx lingo.dev@latest purge --key obsolete.key --yes-really

Purge + Run workflow#

For efficient retranslation, purge first, then run without --force. This leverages the CLI's caching mechanism:

bash
npx lingo.dev@latest purge --key welcome.title
npx lingo.dev@latest run

This approach is more efficient than run --force because it only retranslates the purged content.

Next Steps#

Retranslation
When and how to retranslate content
Automatic Retranslation
How source changes trigger retranslation
i18n.lock
How the lockfile tracks state
i18n.json
Full configuration reference

Was this page helpful?