I have a customized /etc/apt.conf file. It has proxy information. It's structure is like this:
Acquire::http::Proxy "http://user:password@ip_addr:port";
Acquire::ftp::proxy "ftp://user:password@ip_addr:port/";
Acquire::https::proxy "https://user:password@ip_addr:port/";
Several times a week, the content of that file is erased by the OS leaving the file empty.
Afortunately I have a git repository with that file and I can check it back out. But I would really want to know:
What process erases the contents of the file and why?
My Ubuntu version is 12.04
The apt configuration provided by packages is installed as separate files in
/etc/apt/apt.conf.d/
so that it can be added and updated independent of any local changes you make in the main configuration file. It's the same idea behind sources.list and sources.list.d or preferences and preferences.d. Either a single file or modular in the directory works.The best solution is to create your own conf file in
/etc/apt/apt.conf.d
so you can guarantee that it won't be overwritten by package updates.And then you can put your settings in it: