remove irrelevant directories