Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:cleanuppolicies

Remove policies of modules that no longer exist (dry run unless --apply).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/cleanuppolicies.md

On this page

exp:cleanuppolicies

Remove policies of modules that no longer exist (dry run unless --apply).

Script bin/php/cleanuppolicies.php, code in kernel/private/classes/commands/cleanuppolicies.php. Run it from the installation root, as the user the web server runs as:

./console exp:cleanuppolicies --help
php bin/php/cleanuppolicies.php --help

Help text

Remove from database policies defined on module which do not exist in a modules folder
according to settings from module.ini/[ModuleSettings]/ExtensionRepositories.
Without --apply nothing is written: the script lists the policies it would remove. --dry-run is
still accepted and means the same as no flag; --apply together with --dry-run is a usage error
(exit 2). With --apply the script waits 10 seconds before it removes anything (-n: do not wait)
and checks afterwards that none is left. Prints PASS or FAIL at the end.

Example: ./bin/php/cleanuppolicies.php
         ./bin/php/cleanuppolicies.php --apply -n

Options

OptionValueHelp
--applyRemove the policies (the default is a dry run that lists them and changes nothing)
--dry-runThe default, kept for scripts that pass it: list the policies that would be removed, change nothing
-nWith --apply: do not wait 10 seconds before removing

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/cleanuppolicies.php, kernel/private/classes/commands/cleanuppolicies.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x