mkimage-profiles/features.in/cleanup/live/image-scripts.d/99-cleanupdb
Michael Shigorin 33de2428ab live: support livecd-install in 99-cleanupdb too
The same that was done by commit 50bfea9.
Note the duplication, maybe worth to split off...
2016-04-01 16:17:07 +03:00

20 lines
533 B
Bash
Executable File

#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0
# dump what's here by this point
echo "** live packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt database and cache
find /var/lib/apt /var/cache/apt -type f -delete
# not going to need them without rpmdb, it's not even rescue anymore
rpm -e --nodeps apt libapt rpm librpmbuild librpm 2>/dev/null ||:
# finally, drop rpmdb
find /var/lib/rpm -type f -delete
: