Ubuntu – How to change mirrors in Ubuntu Server from regional to main

apt-mirrorcommand lineserversoftware-sources

I have a Lucid Server (10.04) set up and I would like to change the mirror from US (or any other country) to the Main Ubuntu Mirror.

For example my two first entries in sources.list are:

deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

In a Desktop environment I would select the main mirror like this:

Software Sources

But how do I do that from the terminal as I don't have a graphical environment installed!

Best Answer

  • Open your sources.list file using your favorite text editor, e.g.

    sudo nano /etc/apt/sources.list
    

    Locate the text http://us.archive.ubuntu.com/ubuntu and replace it with http://archive.ubuntu.com/ubuntu.

  • Related Question