I am having trouble removing proxy from apt. I recently came home from my institute where they used proxy to access internet. I had set up apt proxy using etc/apt/apt.conf
file. I also had set the environment variables for proxies, and edited the proxy settings. Now that I have removed the lines from /etc/apt/apt.conf
and removed the network proxy settings, I still cannot install apps using apt. Firefox runs fine without any hiccups.
I tried unset
ing the proxy variables but after reboot they still persist.
I am using Ubuntu Mate 18.04
The output of set | grep -i
proxy is :
FTP_PROXY=http://172.16.2.30:8080/
HTTPS_PROXY=https://172.16.2.30:8080/
HTTP_PROXY=http://172.16.2.30:8080/
UBUNTU_MENUPROXY=1
ftp_proxy=http://172.16.2.30:8080/
http_proxy=http://172.16.2.30:8080/
https_proxy=https://172.16.2.30:8080/
no_proxy=127.0.0.0/8,::1,10.0.0.0/8
The Proxy settings look like this:
How can I remove the proxy settings?
I finally figured the proxy variables are either stored in
~/.bashrc
,/etc/bash.bashrc
or/etc/environment
. I had edited the/etc/environment
file before and I forgot that. I grepped each file for proxy and I the lines were inetc/environment
.I removed those lines and now its working fine.
I faced similar problems as you did. The error that showed was
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Block starts with no name
So I then used
sudo nano /etc/apt/apt.conf.d/70debconf
and deleted text related to proxy in it leaving only the following:DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
Doing so solved the issue for me
I managed to fix this by editing and hashing out proxy details under the file
90curtin-aptproxy
under/etc/apt/apt.conf.d
list the proxy settings through
env | grep -i proxy
the output for the following was
I tried the following command to empty those variables export
HTTP_PROXY=
with all the variables done, the proxy settings are back to normal.