removes unused directories