blob: 802665bb0fb9e660194498dd7779feab477000da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
echo "Removing all but base & base-devel..."
#pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg base); do pactree -ul "$i"; done) | sort -u))
#pacman -R $(comm -23 <(pacman -Qq | sort) <((
pacman -Qq | sort > /tmp/allInstalled.reset
rm /tmp/baseDeps.reset
for i in $(pacman -Qqg base base-devel)
do
pactree -ul "$i" >> /tmp/baseDeps.reset
done
for i in pacman glibc pacman-contrib
do
echo "$i" >> /tmp/baseDeps.reset
done
sort -u /tmp/baseDeps.reset > /tmp/baseDepsSorted.reset
removePkgs="$(comm -23 /tmp/allInstalled.reset /tmp/baseDepsSorted.reset)"
pacman -R --noconfirm $removePkgs
#echo "Adding back other packages..."
pacman -S --noconfirm base-devel pacman-contrib asp openssh git python2 dosfstools rsync squashfs-tools libisoburn python2-gitpython parched unison arch-install-scripts lynx python2-ndg-httpsclient wget findbrokenpkgs tig
|