wpkg --force-overwrite ...

By default the installation process verifies that all the files to be installed from the new package do not already exist on the installation target. If any one file exists, then the process fails. This can happen because another package installed a file with the same name in the same directory, or because a program created a file there1.

The --force-overwrite option can be used to still install a package even though some files will be overwritten. This option should really never be used except in a test environment where you see that you made a small mistake and want to test your packages without having to regenerate them first.

You may also need to use the --force-overwrite-dir command line option, but it is really not recommended, ever.

WARNING

Contrary to dpkg (the Debian packager), wpkg does NOT save any information about files getting overwritten. This means uninstalling either the package that originally installed that file or the package that overwrote the file results in that file being removed. It is possible to use the --audit command line option to check for such problems and re-install a package if necessary. Possible procedure:

wpkg --force-overwrite --install offensive-package.deb
[...conduct your tests...]
wpkg --remove offensive-package
wpkg --audit
wpkg --install offended-package(s).deb

The --audit is not required if you know which packages had files getting overwritten.

IMPORTANT NOTE

The --no-force-all, --refuse-all, --no-force-overwrite, --refuse-overwrite all cancel this feature whatever the position of the different options on the command line.

Special Usage: --compress and --decompress

The --compress and --decompress commands make use of the --force-overwrite option to allow the overwriting of existing files. Without this option, the commands silently skip those files.

 
  • 1. At this point wpkg does not make any difference between either case. Later it is expected that wpkg will only be able to overwrite files that were installed by other packages, but never files that were created in some other way.