Delete unused metadata and tmp dirs