Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Can someone provide a script that can fetch package information (name, depends, etc.) from the Packages repository file(s)?

Or can someone tell what the naming convention is for the Packages file?

Let me explain. When we give the command apt-get update it fetches a Packages.gz file from the web which contains each package's information. I need to fetch information for each package from that file. Or I could use a tutorial link instead.

Note: it is not a homework :)

share|improve this question

1 Answer 1

up vote 5 down vote accepted

apt-cache can be used to query the packages list. To get a full list of all known packages, run apt-cache dump.

Generally, you want to get a list of all available packages, and get more information about a certain package.

  • apt-cache pkgnames - shows all available package names
  • apt-cache show [package] - shows all known information about package [package] (multiple outputs are possible if a package exists in multiple repositorues, like a PPA and the main repos)
  • apt-cache depends [package] - shows the dependencies for package [package]
share|improve this answer

Your Answer

 
discard

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.