unpin
The kilm unpin
command removes specified symbol and/or footprint libraries from KiCad’s “Pinned Libraries” list.
It operates by modifying the pinned_symbol_libs
and pinned_fp_libs
arrays within KiCad’s kicad_common.json
configuration file.
Note: Changes require restarting KiCad.
Usage
kilm unpin [OPTIONS]
Options
-
-s, --symbols TEXT
: Specify the name of a symbol library currently in the pinned list to remove. Use this option multiple times to unpin several libraries. Example:kilm unpin -s Device -s MyCustomSymbols
-
-f, --footprints TEXT
: Specify the name of a footprint library currently in the pinned list to remove. Use this option multiple times to unpin several libraries. Example:kilm unpin -f Package_SO -f MyCustomFootprints
-
--all
: Unpin all currently pinned symbol and footprint libraries. Cannot be used if-s
or-f
are specified. Example:kilm unpin --all
-
--dry-run
: Show which libraries would be removed from the pinned list without actually modifyingkicad_common.json
. Example:kilm unpin --all --dry-run
-
--max-backups INTEGER
: Maximum number of timestamped backups KiLM should keep forkicad_common.json
. Default:5
. Example:kilm unpin --max-backups 3
-
-v, --verbose
: Show detailed output during the unpinning process. Example:kilm unpin -s MyLib --verbose
-
--help
: Show this help message and exit.
Behavior
- Locates the KiCad configuration directory and
kicad_common.json
. - Creates a backup of
kicad_common.json
(unless--dry-run
). - Reads the current pinned lists (
pinned_symbol_libs
,pinned_fp_libs
) fromkicad_common.json
. - Determines the target libraries:
- If
--all
, targets all libraries found in the lists. - Otherwise, targets libraries specified via
-s
and-f
.
- If
- Removes the target library names from the respective lists.
- Writes the updated lists back to
kicad_common.json
(unless--dry-run
).
Examples
Unpin specific libraries:
kilm unpin -s ObsoleteSymLib -f OldFootprintLib
Unpin all libraries:
kilm unpin --all
Preview unpinning specific libraries:
kilm unpin -s Device -f Package_SO --dry-run
Unpin all libraries with verbose output:
kilm unpin --all -v