10 lines
310 B
Bash
Executable file
10 lines
310 B
Bash
Executable file
#!/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
|