summarylogtreecommitdiffstats
path: root/dracut-remove
blob: a37ac760ee91bef135f394a334a3e3866c129ded (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash -e

while read -r line; do
	if [[ "${line}" == */pkgbase ]]; then
		pkgbase="$(<"/${line}")"
		kver="$(echo ${line} | cut -d/ -f4)"

		rm -rf "/usr/lib/modules/${kver}" "/boot/vmlinuz-${pkgbase}" "/boot/initramfs-${pkgbase}.img" "/boot/initramfs-${pkgbase}-fallback.img"
	fi
done