After using dpkg to install a package, APT-cache policy returns wrong version

I needed to update firefox 51 to firefox 57.0.4 on some ubuntu 16.04 PCs (who had apt-mark hold on for firefox). Since apt-get policy firefox only allows me to update to the latest version (81.0), I searched for the correct .deb package online and installed it using

dpkg -i firefox-mozilla-build_57.0.4-0ubuntu1_amd64.deb 

But now apt-cache policy firefox still shows the old version of firefox. That's posing a problem now, since we use the apt-cache policy output in some scripts to determine the current installed version of firefox. Is there any way to "sync" the version installed via dpkg back to apt's database?

I also tried purging apt-get's version before using dpkg, but that only results in apt-cache policy saying that "none" version is installed of firefox.

2

Related questions 3 How can I make a Debian package depend on another package with exactly the same version 1 Installing self-created Nuget package forces use of latest version of a dependency, 676 pip uses incorrect cached package version, instead of the user-specified version Related questions 3 How can I make a Debian package depend on another package with exactly the same version 1 Installing self-created Nuget package forces use of latest version of a dependency, 676 pip uses incorrect cached package version, instead of the user-specified version 0 how to tell "dpkg" to NOT to download / install a broken source? 8 How to properly set installed-size for deb package? 1 Files installed from debian package with dpkg do not belong to root 0 Nuget showing incorrect version as latest 3 Prevent apt from overwriting a package manually installed 1 dpkg install fails due to conflicts from another package 1 issue with dpkg when trying --fix-broken with apt Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like