wpkg --autoremove

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.
--dry-run Run all validations then exit.
--instdir Define the installation directory, where the data files are installed on the target.
--no-act Run all validations then exit.
--quiet Request for warning messages to not be displayed.
--root Define the installation root path.
--simulate Run all validations then exit.
--verbose Display log information of level INFO.

The --autoremove command is used to remove packages that were automatically installed to satisfy dependencies. In most cases it is safe to run that command, although if you are managing a very large installation, then you may see some packages that you wanted to keep getting removed (although you'll always be able to reinstall them, of course.)

Packages automatically installed are called implicit dependencies. When such packages get installed, their selection is set to auto which is how the system knows that such and such package can automatically be removed. If some of those packages you would like to always keep, changing their selection to manual with --set-selection is advised.

It is possible to use the --autoremove command with the --purge command so as to actually completely purge those packages (opposed to just removing them.) This is a special case since using two commands in the same run of wpkg is not normally allowed.

Note that the --autoremove command does not accept any --force-... options. This is because in case of implicit removal, force options do not anyway have any effect.