Skip to content

Instantly share code, notes, and snippets.

@skokhanovskiy
Created May 10, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skokhanovskiy/6dc25bf1a28766ede862f36908083b21 to your computer and use it in GitHub Desktop.
Save skokhanovskiy/6dc25bf1a28766ede862f36908083b21 to your computer and use it in GitHub Desktop.
Get list of a manually installed packages sorted by size
apt-mark showmanual | while read -r package; do size=$(apt-cache --no-all-versions show $package | grep '^Installed-Size: ' | cut -f2 -d':' | xargs) && echo "$package $size"; done | sort -rnk2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment