Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

New release of Ubuntu is just out and before upgrading to the new release, you want to check if repo sources that you have in /etc/apt/sources.list.d have added support for the said Ubuntu release

share|improve this question
add comment

1 Answer

Here's a simple script to simplify the task


echo "Checking support for $release"
awk '/^deb / { print FILENAME, $2 }' /etc/apt/sources.list.d/*.list | \
    while read -r filename uri; do
        found=$(curl -I $uri/dists/$release/ 2>&1 | grep -Fc 'HTTP/1.1 200 OK')
        if [[ $found -eq 1 ]]; then
            [[ "$uri" == *launchpad* ]] && result="Nope" || result="Not sure"
        printf "%-50s : %s\n" ${filename##*/} "$result"


Checking support for saucy
dropbox.list                                       : Not sure
google-chrome.list                                 : Not sure
me-davidsansome-clementine-raring.list             : Nope
shutter-ppa-raring.list                            : Found
spotify-stable.list                                : Not sure
tor.list                                           : Found
transmissionbt-ppa-raring.list                     : Found
tsbarnes-indicator-keylock-raring.list             : Nope
ubuntu-wine-ppa-raring.list                        : Found
yorba-ppa-raring.list                              : Nope

Some repos, unlike repos hosted on launchpad.net, for example spotify repo (http://repository.spotify.com/dists/) do not contain ubuntu release specific dirs in their /dists uri path but instead generically named dir like stable, unstable or all to serve packages for multiple Ubuntu releases and also some other debian-based distros. In this case, there's no quick way to be sure if they have support for the ubuntu release that you're checking for. So for these repos that's why you're seeing Not sure in the output.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.