Seeing this piece in the news, about how Debian-Multimedia.org is now unsafe, I was reminded we don't have a tool to manipulate sources.lists entries.
For example:
$ apt-sources list .. deb http://ftp.uk.debian.org/debian/ squeeze main non-free contrib deb-src http://ftp.uk.debian.org/debian/ squeeze main deb http://security.debian.org/ squeeze/updates main deb-src http://security.debian.org/ squeeze/updates main ..
How about listing only my repos?
$ apt-sources list steve.org.uk deb-src http://packages.steve.org.uk/firefox-wrapper/squeeze/ ./ deb http://packages.steve.org.uk/firefox-wrapper/squeeze/ ./ deb http://packages.steve.org.uk/meta/squeeze/ ./ deb-src http://packages.steve.org.uk/meta/squeeze/ ./ deb-src http://packages.steve.org.uk/minidlna/squeeze/ ./ deb http://packages.steve.org.uk/minidlna/squeeze/ ./
Now add in a command to delete lines matching a given pattern:
# apt-sources delete debian-multimedia.org
Doesn't that seem like a tool that should exist?
I've added this quick hack to this repository which you can submit pull requests against, or use as a base.
TODO: Write the "add" handler. Neaten.
Ever felt jealous that Ubuntu users can add PPAs? Nows your chance to do something like this:
# apt-sources add "deb http://packages.steve.org.uk/lumail/wheezy/ ./"