soscmd/soscmd-lspkg
The StarOpenSource Project d9a1fd797d Optimize scripts
2023-09-13 03:17:37 +02:00

9 lines
343 B
Bash
Executable file

#!/bin/bash
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."
exit 1
fi