support rm and forcerm options for build API