%post set -x echo "Packages within this disk image" rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' | sort -rn # Remove all network connections and/or links rm -v -f /etc/sysconfig/network-scripts/ifcfg-link rm -v -f /etc/NetworkManager/system-connections/*.nmconnection # The 'machine-id' needs to be unique for each machine so remove ours to prevent duplication rm -v -f /etc/machine-id touch /etc/machine-id # Like 'machine-id', the 'random-seed' must be generated by the machine on its own rm -v -f /var/lib/systemd/random-seed # Remove the RPM database, let it be re-created when the image boots for the first time rm -v -f /var/lib/rpm/__db* %end