4

I have to use a proxy server which requires authentication. So, I need to update the apt.conf file to include my proxy settings. All fine. What I need is to check that the configuration is correct so that when I try apt-get update, I'll connect to the relevant repositories, etc.

Is there a way to check this without downloading anything to the PC (without update, install, upgrade, etc.)? In short: I'm looking for a way to just ping the repositories without any actual download happening.

Any other ways to validate the apt proxy settings is also welcome...

Edit: I read the manual but I couldn't see the functionality to be available by a simple option/flag. Maybe there is a hack?

Update: So, far the only solution I have is to apt-get install a tiny package and then remove it afterwards. But, I don't really like this approach. What if the package is already installed on the machine? Will apt-get still connect to the repositories (to check if the package is up-to-date)?

Update2: Apparently there is no solution to all the requirements I put in the question. I'll pick the answer with the closest to what I want.

  • What about a try? Make changes; try apt; if it fails - revert the changes ;) – Serge Oct 3 '12 at 17:00
  • @Serge Try what exactly? That's what I'm after. I don't want to use apt-get install or apt-get update, though. – some user Oct 3 '12 at 17:13
2

apt-get update is the way I'd do it. It hits all repositories.

Failing that, you could pretend to force the reinstallation of a small package with apt-get clean; apt-get -d --reinstall install hostname (this will mark the package as to-be-installed, so pick a package that's already installed).

  • Thank you. I think this is the closest we can get to what I wanted to do... – some user Oct 4 '12 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.