Purge CLI v0 translations
Delete selected managed catalog entries and verify the scope before regenerating them.
V0 purge deletes managed catalog entries. It does not perform the current CLI's file-and-lock cleanup. Preserve recoverable copies before running it: an unfiltered purge can remove all managed keys from configured targets.
Select one target and key #
For a flat key literally named app.title in French:
lingo purge --locale fr --key app.titleRead the selected keys and paths in the confirmation before accepting. A dot in this example is part of the flat key; nested representations depend on the loader.
| Flag | 0.138.10 selection |
|---|---|
--bucket json | Bucket types; repeatable. |
--locale fr | Locale codes; repeatable. |
--file messages.json | Substring matching of configured path-pattern values. |
--key app.title | Minimatch matching of decoded managed keys. |
--yes-really | Skip interactive confirmation. |
The purge matcher is not run's boundary-aware key/prefix matcher. Confirm the selected entries rather than relying on matching help text or copying a run --key selector.
Exclude the source explicitly #
Check the chosen locale against locale.source. Supplying the source locale can delete source content too; --locale does not guarantee target-only selection.
Keep the confirmation for first inspection. Use --yes-really only in automation whose exact deletion scope has already been verified. Successful execution says nothing about whether that scope was appropriate.
Inspect deletion before regeneration #
Purge writes catalogs without rebuilding i18n.lock. A subsequent ordinary run sees the missing targets:
lingo run --target-locale frThat run can also process other pending French changes. Inspect the source state and final diff rather than treating it as exactly one translation request.
If regeneration fails, deleted entries remain missing until restored or regenerated. Do not edit checksums to simulate deletion. For an unchanged value that simply needs better wording, selected forced retranslation avoids the intermediate missing-output state.