Created
December 3, 2011 17:39
-
-
Save gnubyexample/1427665 to your computer and use it in GitHub Desktop.
dpkg query - where you are interested in size or want to sort by size - read dpkg-query manpage for explanation of switches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/dash | |
# (c) 2011 Gary Wright - now released into public domain. | |
dpkg-query -W --showformat='${Installed-Size;-10}\t${Section;-15}\t${Package;-30}\n' | sort -g | |
dpkg-query -W --showformat='${Installed-Size;-10}\t${Section}\t${Package}\n' | sort -g | |
dpkg-query --showformat='${Installed-Size;-10} ${Package}\n' -W | sort -g | |
dpkg-query --showformat='${Package}\n${Description}' -W macaulay* | |
#dpkg-query --showformat='${Installed-Size;-10} ${Package}\n' -W lib* | sort -g | |
dpkg-query --showformat='${Status;-2} ${Installed-Size;-10} ${Package;-20} ${Version}\n' -W "python2.5*" | \ | |
egrep '^in' | cut -c4- | sort -g | |
This example is useful for Ubuntu if you want to identify unofficial or multiverse packages: | |
-------------------------------------------------------------------------------------------- | |
dpkg-query -W --showformat='${Installed-Size;-10}\t${Section;-15}\t${Package;-30}\t${Maintainer}\n' | \ | |
sed 's/\<.*\>$//' | grep -v -w Ubuntu | grep -v -w Xubuntu | grep -v metapackages | \ | |
wc -l >> /tmp/dpkgLnotWordUbuntuOrXubuntu.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment