Deletes unused directories.