8

I am new in Ubuntu. I have a trusty version. I do not get the meaning of the file status. I'va figured it out running the command:

apt-cache policy postgresql-9.6

and I got this output:

postgresql-9.6:
  Installed: (none)
  Candidate: (none)
  Version table:
     9.6.2-1.pgdg14.04+1 0
        100 /var/lib/dpkg/status

What does it mean "Break" and "Replace" on file /var/lib/dpkg/status?

Glori P.
  • 183
  • 1
  • 1
  • 4
  • 4
    Possible duplicate of [What do the numbers in the output of apt-cache policy tell us?](http://askubuntu.com/questions/282602/what-do-the-numbers-in-the-output-of-apt-cache-policy-tell-us) – Panther Mar 29 '17 at 16:00
  • `/var/lib/dpkg/status` is the local database used by apt-cache so that you can obtain such information faster and without internet access. – Panther Mar 29 '17 at 16:15
  • @bodhi.zazen, thank you! I took a look inside of it... there are a lot of information! but in particular what does it mean for "Replaces", and "Breaks"? – Glori P. Mar 30 '17 at 08:36
  • Now you are asking very broad questions about apt and packaging. You can read the man pages, packaging guide, and https://www.debian.org/doc/manuals/debian-reference/ch02.en.html see section "2.1.6. Package dependencies" – Panther Mar 31 '17 at 15:47
  • @GloriP. Please ask question specifically regarding "Replaces" and "Breaks" Thought the link will help – Anwar Apr 16 '17 at 15:47

2 Answers2

8

I came to this question when I needed to find what repository given version comes from, and it looks like /var/lib/dpkg/status means currently installed package, and in the OP's example it show that the version is installed, but not currently available from any repository.

This is output I get when the package is available:

# apt-cache policy dpkg
dpkg:
  Installed: 1.16.18
  Candidate: 1.16.18
  Version table:
 *** 1.16.18 0
        500 http://repo/mirror/debian/ wheezy/main amd64 Packages
        100 /var/lib/dpkg/status
     1.16.17 0
        500 http://repo/mirror/debian/ wheezy-security/main amd64 Packages
che
  • 203
  • 2
  • 6
5

Some details can be found at https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_the_dpkg_command

As best as I can tell from reading that, the status file contains status information (of course) about packages.

Based on looking at my own status file, most packages seem to have "Status: install ok installed" (I've found thousands of these). I assume this means that those packages are installed properly. I have a couple dozen or so packages that have some other package.

allyourcode
  • 198
  • 1
  • 10