Skip to content

Instantly share code, notes, and snippets.

@bmatthewshea
Created June 23, 2019 13:24
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 bmatthewshea/229da822f1f02157bff192a2e4a8ffd1 to your computer and use it in GitHub Desktop.
Save bmatthewshea/229da822f1f02157bff192a2e4a8ffd1 to your computer and use it in GitHub Desktop.
Show all APT repositories in use.
#!/bin/bash
# https://askubuntu.com/a/924587/169878
echo
echo "APT Repositories In Use"
echo
echo "Please wait while I update apt command.."
echo
sudo apt update > /dev/null 2>&1 && \
echo "Current repositores:" && \
sudo apt-cache policy | grep http | awk '{print $2 $3}' | sort -u
@bmatthewshea
Copy link
Author

bmatthewshea commented Jun 23, 2019

Expanded version of apt-cache command sequence given here: https://askubuntu.com/a/924587/169878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment