Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
up vote 1 down vote accepted

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).

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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