remove referencing directories