When you install a package manually via a .deb it doesn't get updated by apt
(see also this question), but what happens when you install a package that isn't available from the repositories for the current Ubuntu version, but gets included into a later Ubuntu version. When you upgrade to this new version that includes the package by default, will the system:
- Realize that the package is already installed and update it in the proper way.
- Realize that the package is already installed, but hold it on the manually installed version.
- Not realize that it is installed and install it again, causing the same package to be installed twice.
- Crash and burn in some other way?
If any of the later options is the correct answer, how do I prevent it?
The package manager doesn't care whether a package has been installed by
dpkg
orapt
. If it finds a newer version of a package in the repositories that newer version gets installed.In your case that means your package gets updated if the package in the new Ubuntu version has a higher version number.
See "How to prevent updating of a specific package?" if you don't want updates for your package.
Maybe it's only certain sources that include the ability to update. The linked you posted states that when you install with dpkg it bypasses apt and therefore won't get updated.
As a test I searched what version of nodejs is available in Utopic (v0.10.25) and then installed nodejs (v0.10.20) using checkinstall
I downloaded and extracted then ran:
Once installed I checked the version and it was in fact 0.10.20
I then did an
And was told node was being held back
So I tried
And it updated node. I check version after and it reports 0.10.25 (the version available for Utopic)
So I'm not sure if it only some packages manually installed that will update, or if it cause I used checkinstall to make the deb/install.
The only weird thing is when I manually installed I checked version with
But since update using apt, now I have to use
So again, I built an old version deb from source using checkinstall and it updated to latest version using