Modifying timeout for proxy in apt settings

It could be required to modify a default timeout value for requests that apt performing when obtaining package lists and packages itself.

It could be required to modify a default timeout value for requests that apt performing when obtaining package lists and packages itself. As example, the traffic can be inspected on its way and this could increase the delay.

apt has a configuration option that allows you to tune timeouts, but it's weirdly documented.

To add/change timeout, open apt configuration file. The proxy settings is either in /etc/apt/apt.conf or /etc/apt/apt.conf.d/80proxy.conf.

In my case configuration looks like this:

/etc/apt/apt.conf.d/80proxy.conf                                                                                                                                 
Acquire::http::proxy "http://proxy.local:3128/";
Acquire::ftp::proxy "http://proxy.local:3128/";
Acquire::https::proxy "http://proxy.local:3128/";

To change timeout setting add these options:

Acquire::http::timeout "240";
Acquire::https::timeout "240";

where "240" is a timeout in seconds.


Share Tweet Send
0 Comments
Loading...

Related Articles