To clarify, you are asking if it is possible to change what mirror you are using without editing your sources.list? As far as I know, you will need to be able to edit your sources.list to use a different mirror than the one your sources.list is currently configured to use.
However you can use netselect-apt
to discover the fastest mirror for your region and use that one to fetch updates from.
1. netselect-apt
This post appears to be related to your question. It references using netselect-apt
to automatically detect the best repository mirror to use for your sources.list. You can also reference the netselect-apt
manpage to learn more about using netselect-apt
. You can run this command as root(sudo):
netselect-apt -c indonesia -t 15 -a amd64 -n jessie
to select the fastest repository to use. The -c
option checks repositories in the Indonesia region, -t
checks the top 15 sites, -a
is to the CPU architecture your machine uses (in this case 64-bit), and -n
is for what repository you want to pull from (stable/testing/release/etc). You can run this command to automatically update your sources.list with the fastest mirror. Remember to use the correct parameters for your system.
Alternatively you can just run netselect-apt
and you should get similar results.
There is also another tool to find fast mirrors and automatically edit your sources.list. apt-spy
works just like netselect-apt
.
2. Manually Discovering Better Mirrors
I have found this site that can help you find better mirrors to use based on your region. Enter in your criteria and then edit your sources.list with the results you get.
Conclusion
I do not know of a way to use an alternate mirror with apt
without editing your sources.list. I know other package managers have dynamic mirror list systems built into them but none exist for apt
. If someone could correct me on this I would greatly appreciate it. However there are tools you can use to discover better mirrors for apt
to use based off of your region and bandwidth.
netselect-apt
and apt-spy
are command-line tools that can help you do what you are asking. Remember you need root or sudo privileges to run these commands, just like you do when running an update or completing some kind of package management task. Best of Luck!