I am new to packaging.
This website states that the steps during an upgrade are:
Hence, the order of operations during an upgrade is:
Regarding step 5, how exactly does it determine which files it should delete? Does it only delete files that are part of the %install/%post
step of the old version? Or would any files in the install dir (if the concept of "the install dir" even makes sense) that is not part of the new version's %install/%post
get deleted?
The files listed in the %files
section. That's why they're needed to be explicitly given.
You didn't mention that if they are tagged %config
they won't be overwritten.