for name in $(bzr check 2>&1 | grep "Stored revisions missing" | sed -e 's/.*{\(.*\)}.*/\1/p' -e 's/,/ /g') ; do rm .bzr/revision-store/*/"$name" ; done Your mileage may vary... Thanks to Robert Collins for helping me with this. -Andrew.