If a package is already installed and needs to be upgraded, the package should be able to indicate upgrade steps to be run between any source and target versions.
The package manager should have separate commands for upgrading a package vs fresh install with the ability to intentionally override and do a fresh install (bypassing upgrade steps) if they want (for example in a dev environment).