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.

Published by

Sam

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

One thought on “Apt can’t see sources? Try changing the User Agent”

Leave a Reply

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