🎉 v1.0

Get started

  • Welcome
  • Documentation
  • Pricing
    Soon

Tools

  • I18n MCP
  • CLI
  • CI/CD Integrations
  • Compiler
    Alpha
  • Connect Your Engine

Resources

  • Languages
  • LLM Models
  • Guides

Company

  • Enterprise
  • CareersHiring!
Dashboard

Lingo.dev CLI

  • How it works
  • Setup

Configuration

  • Supported formats
  • i18n.json
  • i18n.lock

Features

  • Existing translations
  • Adding languages
  • Overrides
  • Translator Notes
  • Translation keys
    • Key renaming
    • Key locking
    • Key ignoring
    • Key preserving

Performance

  • Large projects
  • Parallel processing

Retranslation

  • Automatic Retranslation
  • Retranslation
  • Remove translations

Remove Translations

Max PrilutskiyMax Prilutskiy·Updated 1 day 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?