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

20 lines
465 B
Bash
Raw Normal View History

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