live-iso-kde/chroot_scripts/4-uninstall-rem-lists.sh

20 lines
465 B
Bash
Raw Normal View History

2024-08-01 14:23:17 +02:00
#! /bin/bash
set -e
export DEBIAN_FRONTEND="noninteractive"
2024-08-01 15:56:33 +02:00
touch /chroot_scripts/rem_list
2024-08-01 14:23:17 +02:00
2024-08-01 15:56:33 +02:00
for rem_list in /chroot_scripts/rem-lists/*.list
2024-08-01 14:23:17 +02:00
do
for pkg in $(cat $rem_list)
do
2024-08-01 16:32:06 +02:00
if [[ $pkg != "#"* ]]
then
apt-get purge --yes --option Dpkg::Options::="--force-confnew" --option Dpkg::Options::="--force-overwrite" $pkg || true
2024-08-01 16:32:06 +02:00
fi
2024-08-01 14:23:17 +02:00
done
done
apt-get autoremove --yes --option Dpkg::Options::="--force-confnew" --option Dpkg::Options::="--force-overwrite"