Delete Schematic Component
delete_schematic_componentRemove a placed component symbol from a KiCAD schematic (.kicad_sch) while optionally deleting attached net labels to prevent dangling-label ERC errors. The symbol definition remains intact.
Instructions
Remove a placed symbol from a KiCAD schematic (.kicad_sch).
This removes the symbol instance (the placed component) from the schematic. It does NOT remove the symbol definition from lib_symbols.
With deleteAttachedLabels, net labels sitting exactly on the deleted component's pin positions are removed too — unless a label is still attached to a wire or another component's pin. Recommended when permanently removing a wired part, since orphaned labels otherwise produce label_dangling ERC errors. Default false for backward compatibility (delete-then-re-add workflows rely on labels surviving).
Note: This tool operates on schematic files (.kicad_sch). To remove a footprint from a PCB, use delete_component instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference | Yes | Reference designator of the component to remove (e.g. R1, U3) | |
| schematicPath | Yes | Path to the .kicad_sch file | |
| deleteAttachedLabels | No | Also delete net labels sitting on the deleted component's pin positions, unless still attached to a wire or another component's pin (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |