Skip to the content
Documentation

exp:trashpurge

No ratings yet

Available before Exponential 6: the legacy kernel had it before Exponential 6; the 4.x reference had no page for it.

Summary

Permanently delete all objects in the trash (dry run unless --apply)

Usage

./console exp:trashpurge [options]
php bin/php/trashpurge.php [options]

Help

The output of ./console help exp:trashpurge (the script run with --help), without the standard options:

Usage: bin/php/trashpurge.php [OPTION]...
Empty Exponential trash.
Permanently deletes all objects in the trash.
Without --apply nothing is deleted: the script counts and lists what it would purge. --dry-run
means the same as no flag; --apply together with --dry-run is a usage error (exit 2). The cronjob
part trashpurge purges as before.

./bin/php/trashpurge.php
./bin/php/trashpurge.php --apply


Options:
  --apply                  Purge the objects (the default is a dry run that lists them and deletes nothing)
  --dry-run                The default: count and list what would be purged, change nothing
  --iteration-sleep=VALUE  Amount of seconds to sleep between each iteration when performing a purge operation, can be a float. Default is one second.
  --iteration-limit=VALUE  Amount of items to remove in each iteration when performing a purge operation. Default is 100.
  --memory-monitoring      If set, memory usage will be logged in var/log/trashpurge.log.
  --trashed-days=VALUE     If set, only objects that has been trashed for at least the specified amount of days will be purged.

Options

Option Value Description
--apply - Purge the objects (the default is a dry run that lists them and deletes nothing)
--dry-run - The default: count and list what would be purged, change nothing
--iteration-sleep required Amount of seconds to sleep between each iteration when performing a purge operation, can be a float. Default is one second.
--iteration-limit required Amount of items to remove in each iteration when performing a purge operation. Default is 100.
--memory-monitoring - If set, memory usage will be logged in var/log/trashpurge.log.
--trashed-days required If set, only objects that has been trashed for at least the specified amount of days will be purged.

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/trashpurge.php, kernel/private/classes/commands/trashpurge.php

See also

Generated example: exp:trashpurge

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.