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
|
2024-08-29 19:29:48 +02:00
|
|
|
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
|
|
|
|
|
2024-08-29 19:29:48 +02:00
|
|
|
apt-get autoremove --yes --option Dpkg::Options::="--force-confnew" --option Dpkg::Options::="--force-overwrite"
|