How to delete a footprint in KiCad using Python?
To delete a footprint in KiCad using Python, use the pcbnew module. Here's a script example:

```python
import pcbnew

# Load the current board
board = pcbnew.GetBoard()

# Find the footprint to delete
footprint_ref = 'C2' # Replace with your footprint reference
footprint = board.FindFootprintByReference(footprint_ref)

# Check if the footprint exists
if footprint:
    # Delete the footprint
    board.Remove(footprint)
    board.Save('path/to/save/your/pcb.kicad_pcb')
else:
    print('Footprint not found')
```

This script deletes a specified footprint from the current PCB.