wpkg --remove-database-lock

Options Comments
--admindir Define the administration directory, where the database of the installed packages resides.
--debug Define a set of flags of things to print out for debug purposes.
--instdir Define the installation directory, where the data files are installed on the target.
--quiet Request for warning messages to not be displayed.
--root Define the installation root path.
--verbose Display log information of level INFO.

The --remove-database-lock command is used to remove a lock that was created using --create-database-lock. See a script example on the page of the --database-is-locked command.

It can also be used to remove the lock in case the wpkg application crashes and somehow doesn't release the lock as expected (the application uses RAII to ensure that the lock is removed before the application quits but in some rare circumstances it may still fail.)

You should make 100% sure that the packager is not currently in use with --install, --unpack, --configure, --deconfigure, --remove, or --purge before running the --remove-database-lock command or unknown results may ensue.

You can use the --database-is-locked command to know whether the database is currently locked.