How can I upgrade my deb package
dpkg --install package.deb
should cleanly upgrade from an older version of a package to a newer one without issue. If it is complaining about a conflict, then the new package is not an upgrade but is instead an actual different package, and upgrading is (rightly) not performed. If you are not going to use apt
repositories for package management, ensure you are obtaining the deb
file from the same source as the older version and that it is provided as an upgrade to the prior package.
Vlad
Updated on September 18, 2022Comments
-
Vlad over 1 year
I have qt project and deb package that is built using following command:
dpkg-buildpackage -us -uc
After this action, my package is ready to install. But if I have my package installed and I want install the same or newer, it removes all files which were installed by this deb package. Only action that works is removing old package before installing newer using following command:
dpkg --remove myqtapp
P.S. To install Deb package I use
dpkg -i ...
-
Ipor Sircer over 5 yearsUse newer branch of Debian for newer packages, e.g. testing.
-
tink over 5 yearsI guess you'll need to have a look at your own pre-/postinstall scripts and determine whether all the files you're distributing are actually put in sensible places ...
-
raultm about 2 yearsdid you solve this problem? i'm struggling with the same problem right now, new install overrides files modified. I think with preInst and postInst we can backup all the current files and restore them after install but i think there would be a better approach
-
-
theProcrastinator over 2 yearsIs there any way to set this up for auto-update? Like I installed WPS office via
dpkg
but have to download.deb
file and update it manually everytime. Thanks. -
Pankaj Goyal over 2 yearsThat is beyond the scope of this question, but if you can procedurally determine a URL from which you can obtain the latest package file, you could set to a
cron
job to fetch the package, determine if its hash has changed from the last installed version, and if so install it.