my first post on the forum, I hope I put it in the right place.
I have developed a Qt homescreen widget for Maemo, made a debian package and installed it on my N900. Now I've made some modifications to it and created a new debian package with higher version number.
App manager successfully updates my app, but instead of replacing the old desktop widget with the newer one, it just adds a second widget to the desktop. So I have both the old and the new version running simultaneously.
My question is: what should I do to make the upgrade work correctly (= remove old widget if it was running and replace it with the newer one)? I suspect I will have to do add debian preinst/postinst scripts but I'm not sure what I should put inside them.