wpkg --force-remove-essential ...

By default, wpkg refuses to remove packages marked as being Essential for your target environment. For example, in the mingw environment, the MSYS package is marked as being essential because removing it is pretty much equivalent to removing everything.

Before removing a package, the packager validates all the dependencies defined in all the installed packages. If any one package depends on the package that is marked for removal, then the removal fails. It is possible to use the --recursive option to remove those dependencies automatically:

  • Say wpkg --remove A fails because B depends on A.
  • However, wpkg --recursive --remove A works because you asked wpkg to automatically remove B.

Yet, the --recursive option never automatically selects an essential package for removal (even when --force-remove-essential is used.) So when it is necessary to remove an essential package, you must specify the name of the essential package on the command and you must also use the --force-remove-essential option:

wpkg --force-remove-essential --remove essential-package-name

An example of Essential package is the package of wpkg itself and in an environment such as MingGW, the MSYS package is the base and thus always required and thus can as well be marked as essential.

Note that wpkg also supports the Hold selection (see --set-selection) which can be used to protect an installed package (prevent automatic upgrade and removals) and the required Priority which is now used by the runtime package of wpkg.

IMPORTANT NOTE

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