Apt can’t see sources? Try changing the User Agent

If you are trying to use apt behind a corporate firewall, try changing the user agent apt is using with wget to load the package lists. By default it uses:

User-Agent: Debian APT-HTTP/1.3

which isn’t recognised by the filter.

1. Create and edit /etc/apt/apt.conf

sudo vi /etc/apt/apt.conf

2. Paste the following into the file:

Acquire
{
  http::User-Agent "Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0";
};

3. Update apt

sudo apt-get update

Tada.

By Sam

Drupal developer from Perth, Western Australia. I love programming, gaming, the Internet, growing vegetables and hiking.

1 comment

Leave a Reply to Manuel Lazo Cancel reply

Your email address will not be published. Required fields are marked *