trim unused dir