I am trying to install a package python-pygments under Ubuntu. After launching sudo apt-get install python-pygments, it is blocked:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.
Need to get 347 kB of archives.
After this operation, 2,527 kB of additional disk space will be used.
0% [Connecting to cache.polytechnique.fr (]

cache.polytechnique.fr in the line line is the proxy of my school. A download in the campus should work, but the problem is that I am physically not in the campus. I try to remove proxy setting via Chromium (the method of network proxy: NONE), it still drives to cache.polytechnique.fr, does anyone know how to let sudo avoid this proxy?

  • my question is you got internet explorer in ubuntu? ... changing the proxy of browser don't change the proxy for apt...and you might have used global proxy settings ..so disable that.
    – emtin4
    Dec 13, 2011 at 3:59
  • It is actually Chromium, I have amended it... could you please tell me how to disable the global proxy settings?
    – SoftTimur
    Dec 13, 2011 at 4:19
  • what is you ubuntu version ..it is 11.10?
    – emtin4
    Dec 13, 2011 at 4:31

2 Answers 2


You probably set the proxy settings globally, so that they applied to all applications, including apt-get.

When you turn off the proxy settings, click the button that says "Apply system wide" (or something like that). It will prompt you for your password. Now you need to restart Terminal in order to have the settings applied.

If that does not solve the issue, see if /etc/apt/apt.conf exists. This can be done with:

cat /etc/apt/apt.conf

If the file exists (if you see some output), open it up. This can be done with:

gksudo gedit /etc/apt/apt.conf

If the file contains a line with Acquire::http::Proxy in it, delete the line, or put a # in front of the line. Save the file and exit the text editor.

Try sudo apt-get command again.


You can add following line in /etc/apt/apt.conf:

Acquire::http::proxy DIRECT;

Not the answer you're looking for? Browse other questions tagged .