Change software sources from the command line

view story

http://askubuntu.com – When I want to change the mirror I am using for updates, I can open the Software Centre, and go to Edit->Software Sources, and from there select another server. This then goes through my /etc/apt/sources.list file, and replaces all the instances of the old mirror URL, with the new mirror URL. If, however, I want to do this on the command line (perhaps I'm not running X, or I'm connecting over ssh), I have to go through the /etc/apt/sources.list file myself and change each instance. This isn't the hardest thing to do, and of course I can do a search and replace, but it is a lot more work tha (HowTos)