|
Documentation
Book a DemoPlatform
PlatformMCPCLI
APIWorkflows
GuidesChangelog

Overview

  • @lingo.dev/cli

Getting started

  • Quickstart
  • Configuration

Reference

  • lingo push
  • lingo pull
  • Other commands
  • lingo purge

Configuration

  • Key controls
  • Formats
  • Locales

Guides

  • Adding a locale
  • Existing translations
  • Retranslation
  • Translator notes
  • Runs, state, and recovery
  • CI/CD
  • Monorepos
  • Large projects

Looking for the older CLI (v0)? See the legacy CLI docs

lingo purge

Delete derived target files and/or the lockfile. Destructive — runs as a dry-run unless you pass --yes.

text
lingo purge [--locale <code>...] [--file <substring>...] [--lockfile-only] [--yes]

With no flags, purge targets every derived file for every configured target locale, plus .lingo/lock.json.

Flags#

FlagEffect
--locale <code>Limit to the listed target locales. Repeatable.
--file <substring>Limit to source paths containing this substring. Repeatable.
--lockfile-onlyKeep all target files; delete only .lingo/lock.json.
--yesActually delete. Without it, purge only prints what it would remove.

Dry run by default#

bash
lingo purge --locale fr
text
Would delete (dry run — pass --yes to apply):
  content/fr/app.json
  content/fr/guide.md
  ...

Add --yes to apply.

Examples#

Remove one locale#

bash
lingo purge --locale ja --yes

Deletes every ja target file. Pair with removing ja from targetLocales in config.

Cheap per-locale retranslation#

bash
lingo purge --locale fr --yes
lingo push --backfill-missing

Deletes the French targets, then regenerates only what's missing. Cheaper than --force because every other locale stays a cache hit. See Retranslation.

Narrow to specific files#

bash
lingo purge --file marketing --locale de --yes

Deletes German targets whose source path contains marketing.

Reset the lockfile only#

bash
lingo purge --lockfile-only --yes

Keeps every translation on disk but drops .lingo/lock.json. The next lingo push re-hashes all sources from scratch. Use when the lockfile is out of sync with what's actually on disk.

There's no undo

purge --yes deletes files immediately. If your translations aren't committed to git, they're gone. Run without --yes first to confirm the file list.

Coming from the legacy CLI?#

The legacy CLI's purge also filtered by --key and --bucket. The current CLI filters by --locale and --file (source path substring) only. To clear specific keys, edit or delete them at the source and re-run lingo push.

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated about 8 hours ago·1 min read