While doing some support audits I'd like to know what would be the most efficient/compact way to get a list of all extra reporitories being used on a given Ubuntu workstation using command line (not via the GUI tools). So far I am using:
- diff'ing a standard sources.list file against the workstation's
- examining files under cat /etc/apt/sources.list.d
Any other ideas on how to best go about this ?
To examine the files under
/etc/apt/sources.list.d
, you could use:cat /etc/apt/sources.list.d/*.list | grep -v "^#"
This reads out the contents of all the files there and then cuts out all commented out lines. This way you only get the repositories that are actually in use.
Using the existing apt python modules, you can write a very small script:
If you open software-properties-gtk, the Other Software tab will show a list of the extra repositories being used.
software-properties-gtk can be opened by opening Update Manager and selecting settings, or opening the Software Center, Edit -> Software Sources ...
You could open software sources (In the edit menu of the software center) and then switch to other software tab .