soscmd/soscmd-lspkg

10 lines
343 B
Text
Raw Normal View History

2023-06-03 11:28:50 +02:00
#!/bin/bash
2023-09-13 03:17:37 +02:00
if [ -f "/bin/dpkg" ]; then
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
elif [ -f "/bin/pacman" ] && [ -f "/bin/pacman-key" ]; then
LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
else
echo ":: Error: You are not running a Debian or Arch Linux based distro."
2023-06-03 11:28:50 +02:00
exit 1
fi