#!/bin/bash for c in `schroot -l`; do case "$c" in *-*-*-*) ;; source:*-*-sbuild) echo "Doing $c" schroot -c $c -u root -- sh -c 'apt-get update && apt-get dist-upgrade -y && apt-get clean' echo ;; esac done