build: fix STAGING_DIR cleaning for packages