Can I update a dpkg-installed package with apt?
-
I have a package (unifi) that I think I installed with dpkg. (I was following an online guide that I can't find now and didn't know what I was doing at the time.) The package is working, and has production data in it. An apt list unifi lists it as "unifi/now", which, iiuc, means it was installed from a local file. (Another Ubuntu server with the same package lists it as "unifi/stable,now", which I think means it came from the "stable" repository.)
Back to the first server, there is a newer version in the repository, and I'd like to upgrade. The problem is that, when I run sudo apt upgrade unifi, it tells me unifi is already at the newest version, which I know is untrue.
What I'd like to do is to get this package "into the apt ecosystem" so future upgrades can be done through apt. Is it possible to tell apt, "Hey, I know this was installed without your help, but I'd like for you to take over now?" -
Hey @Bryan-Sullo
If it were me I would take a full offline backup of the system (like to some removable media) and then move the production data to a new backup directory on the local disk.
Then you can uninstall unifi then reinstall using apt and hopefully you can just copy your production data back to the new installation and all is well. And from then on you'd be on the apt system, but if it all goes sideways you can just restore from your backup drive.
If you can clone your system in to a VM that would be even better (unless it's a VM already). Then you can just take a snapshot of the system, try a few things, and if it doesn't work then restore to snapshot and try something else.
Not sure if that is a viable solution for you, but it may be worth a shot.
Cheers,
Daniel