wpkg --no-force-overwrite | --refuse-overwrite ...

The --no-force-overwrite option cancels the effect of the --force-overwrite option wherever it appears on the command line (before or after the --force-overwrite option). It prevents the installation of packages if any one of their files would overwrite a file that already exists on the target.

Note that this option uses a simple if file exists test. It does not check whether another package already installed a certain file. This is a lot safer since a program or a user may create a file that could also be installed by a package1.

The --refuse-overwrite option is an exact equivalent.

  • 1. Note that this only applies to files that the packager is to unpack from a .deb package. If the package maintainer creates files using a script, the package is not responsible for those and thus a package may still end up overwriting some files!