disable apt repo
sudo sed -i 's:^deb:#deb:' /etc/apt/sources.list
remove unwanted repo:
sed -i '/^#/d' sources.list
sed -i '/^deb-src/d' sources.list
sed -i '/backports/d' sources.list
sed -i '/multiverse/d' sources.list
sed -i '/^$/d' sources.list