prune data dir based on prefix instead of folders