script: Fix clearing patches