Score:-1

Why the version of apt show 'XXX' and apt policy 'XXX' is display difference?

nf flag

I am checking one package version, finding these two commands display difference version.

e.g.

apt show A:

Version: 1.0

apt policy A:

Installed: 0.9
Candidate: 1.0

Then, which version is belonged to package A? Whether I need configure something?

user535733 avatar
cn flag
Please provide a real, working example.
guiverc avatar
cn flag
I'd use `apt-cache policy` to view all details of what is available; my preference for viewing what I think you're asking for, but sorry it's rather unclear what you're asking.
chfyljt avatar
nf flag
I want to know the version of A, 0.9 or 1.0? Why apt show displays 1.0 but apt policy is 0.9?
guiverc avatar
cn flag
Provide your OS & release & full pastes of what you see... If you were using my release for example (*chances are you're not but I can adjust for whatever release you're using once it's known*) we can explore the output you're seeing & tell you why you're seeing it.. but currently we have no OS/release nor package details to look up. If you're asking what I think you're asking; `apt-cache policy` shows the clearest detail in understand what I think you're being confused by; but without package I can't explore what you're actually seeing.
Score:1
sa flag

There is no contradiction in the different results of apt show A and apt policy A .

The Version: 1.0 output of apt show A shows that the latest version of the A package in the Ubuntu repositories that is currently installable is 1.0. The Installed: 0.9 Candidate: 1.0 output of apt policy A shows that version 0.9 of the A package is currently installed, but it is not the latest version according to the results of apt show A. To update the A package to the latest version run sudo apt install A

chfyljt avatar
nf flag
Thanks. you mean the display of 'apt show A' is not mean the currently version? It should latest version in useable?
karel avatar
sa flag
`apt show A` shows the latest version of A that is currently installable, for example with `sudo apt install A`
chfyljt avatar
nf flag
Thanks. I used to think this command is mean that the currently version in system.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.