Content Server Manual / Version 2512.1
Table Of ContentsIf a content item has been deleted or destroyed, there may be left-over variants that are unused now. To remove such variants automatically, the command line tool cm cleanvariants has been provided. You can run it on the command line:
usage: cm cleanvariants -u <user> <other options> [ -l <limit> ] [
<id1>... | -I <id1>... | -U <uuid1>... | -t <path1>... | -cq
<query1>... ]
available options:
Options Description
-b, --before <arg> maximum date for content items to
be cleaned <default=30 days
before now>. Format is
yyyyMMddHHmmss
-cq, --contentquery <query> query/queries to select contents
-d, --domain <domain name> domain for login
(default=<builtin>)
-g, --grpc-endpoint <gRPC endpoint> gRPC endpoint to connect to
--http-base-uri <HTTP base URI> HTTP base URI of Content Server
where HTTP servlets are provided
(e.g. blob servlet)
-I, --id <id> id(s) to select content objects
-l, --limit <limit> limits the number of content
objects to select, negative for
unlimited which is also the
default
-p, --password <password> password for login; you will be
prompted for password if not
given
-s, --simulate simulation mode where no content
items will be deleted
-t, --path <path> path(s) to select content objects
-U, --uuid <uuid> UUID(s) to select contents
-u, --user <user name> user for login (required)
--url <ior url> url to connect to
-v, --verbose enables verbose output
The tool is applied to every content selected via the content selection parameters and deletes it, if it is a variant with a deleted baseline. If folders are selected, the clean operation is performed recursively on every content item inside.
By default, a variant will be deleted if any of these conditions hold:
The variant's baseline is destroyed;
The variant's baseline was deleted more than 30 days ago. The
-boption can be specified to specify another latest date at which the baseline content item may have been deleted for the variant to be cleaned.
However, even in such cases a variant will not be deleted if any of these conditions hold:
The variant is published;
The variant is already destroyed or deleted;
The variant is referenced by another content item, even through a weak link.
After running this tool, cm cleanrecyclebin can be used to permanently remove the deleted content items.
The following command line options are supported in addition to the standard option to provide the server connection:
| Parameter | Description |
|---|---|
-b | Only remove content items whose baseline was deleted before the given date. Format:
yyyyMMddHHmmss. Default is 30 days from the actual date. |
-cq <query> |
Content Selection
Content Query to locate contents.
Parameter can be used multiple times. Results will be linked by OR.
Clean Variants will traverse folders recursively.
|
-I <id> |
Content Selection
Select contents via explicit id. This is an alternative if you want to mix
explicit ids with for example content queries.
Parameter can be used multiple times. Results will be linked by OR.
Clean Variants will traverse folders recursively.
|
-U <UUID> |
Content Selection
Select contents via UUID. This is an alternative if you want to mix
UUIDs with for example content queries.
Parameter can be used multiple times. Results will be linked by OR.
Clean Variants will traverse folders recursively.
|
--simulate | Do not delete any content but perform a simulation. |
-t <path> |
Content Selection
The path of a content to be cleaned.
Parameter can be used multiple times. Results will be linked by OR.
Clean Variants will traverse folders recursively.
|
-l <limit> | Content Selection Limit the number of selected contents. Default is unlimited. Limit does not apply to recursively located contents. |
Table 3.26. Options of the clean variants
IDs of content items to be cleaned are appended on the command line. They can also be specified using the
-I option. Numeric IDs will be interpreted as content IDs. Otherwise, use explicit
content IDs (coremedia:///cap/content/1234). For more formats have a look into the
Unified API developer manual.


