Skip to content

Instantly share code, notes, and snippets.

@paradigm
Last active February 27, 2020 18:02
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 paradigm/0686f4886c0abf41a3bc37cb6b0d0954 to your computer and use it in GitHub Desktop.
Save paradigm/0686f4886c0abf41a3bc37cb6b0d0954 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Finds redundant Bedrock packages
#
# Assumes `pmm` is set to mimic apt. Adjust accordingly for other pmm front-ends.
pmm-mark showmanual 2>/dev/null | awk '{
if ($2 in pkgs) {
redundant[pkgs[$2]]
redundant[$0]
}
pkgs[$2] = $0
}
END {
for (r in redundant) {
if (r != "") {
print r
}
}
}' | sort -k2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment