The pre-upgrade space clearance function is added to resolve the problem that the upgrade
fails due to residual resources when the upgrade is performed again after a power failure.
Fix the rollback failure when the upgrade fails due to the upgrade using different architectures.
Signed-off-by: liyuanr <liyuanrong1@huawei.com>