enh: install: ensure repository is clean before installation