Created
June 23, 2019 13:24
-
-
Save bmatthewshea/229da822f1f02157bff192a2e4a8ffd1 to your computer and use it in GitHub Desktop.
Show all APT repositories in use.
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/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expanded version of
apt-cache
command sequence given here: https://askubuntu.com/a/924587/169878