11 lines
310 B
Text
11 lines
310 B
Text
|
#!/bin/bash
|
||
|
if [ ! -f "/usr/bin/pacman-key" ]; then
|
||
|
echo ":: Error: You are not running a Arch Linux based distro."
|
||
|
exit 1
|
||
|
fi
|
||
|
if [ "$(pacman -Qdtq)" == "" ]; then
|
||
|
echo ":: Error: No unused packages or dependencies can be uninstalled with pacman."
|
||
|
exit 2
|
||
|
fi
|
||
|
pacman -R $(pacman -Qdtq) --recursive --unneeded
|