Super User is a question and answer site for computer enthusiasts and power users. 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

If I run the command apt-cache showpkg {packagename}, does it only show the details of the package of it is installed or does it not matter? If I run the command apt-get update, does this update apt-get's cache and hence showing me all the package details?

share|improve this question
up vote 3 down vote accepted

apt-get update downloads the package lists and metadata to your local box. With apt-cache you look up stuff in the local data (local "apt cache").

See more information at

man apt-cache
share|improve this answer
Thanks. So does apt-get update update the apt cache? If not where does apt-cache get its information from? – PeanutsMonkey Mar 17 '12 at 2:12
Let me help you finding that information out by yourself. Run strace -f -e trace=open apt-cache search test |less and see the output. You will find lines such as open("/var/lib/apt/lists/ftp.hosteurope.de_mirror_archive.ubuntu.com_dists_hardy‌​-security_universe_binary-amd64_Packages", O_RDONLY) = 8 which leads you to the folder /var/lib/apt/lists. This is only one of them, usually /var/lib/apt and /var/lib/dpkg contain the locally stored information. – Valentin Mar 17 '12 at 9:44

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.