delete cache and figure dir