centos: clean up yum caches after installing packages

So that we can get smaller rootfs.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
Peng Tao 2018-01-30 18:55:55 +08:00
parent 82759dac14
commit 2a2a79aa87

View File

@ -129,6 +129,7 @@ build_rootfs() {
DNF="${PKG_MANAGER} --config=$DNF_CONF -y --installroot=${ROOTFS_DIR} --noplugins"
$DNF install ${EXTRA_PKGS} ${PACKAGES}
$DNF clean all
[ -n "${ROOTFS_DIR}" ] && rm -r "${ROOTFS_DIR}/var/cache/centos-osbuilder"
}