Versions

These commands are only available when the "Versions" app (files_versions) is enabled. These commands are not available in single-user (maintenance) mode.

versions:cleanup

versions:cleanup can delete all versioned files, as well as the files_versions folder, for either specific users, or for all users.

sudo -u www-data php occ versions:cleanup [<user_id>]...

Options

user_id

Delete versions of the given user(s), if no user is given all versions will be deleted.

The example below deletes all versioned files for all users:

sudo -u www-data php occ versions:cleanup
Delete all versions
Delete versions for users on backend Database
  freda
  molly
  stash
  rosa
  edward

You can delete versions for specific users in a space-delimited list:

sudo -u www-data php occ versions:cleanup freda molly
Delete versions of   freda
Delete versions of   molly

versions:expire

versions:expire deletes only expired files according to the versions_retention_obligation setting in config.php (see the File versions section in config_sample_php_parameters). The default is to delete expired files for all users, or you may list users in a space-delimited list.

sudo -u www-data php occ versions:expire [<user_id>]...

Options

user_id

Expire file versions of the given user(s), if no user is given file versions for all users will be expired.