To delete an installed workflow run directory, we recommend using
cylc clean command.
cylc clean takes care of deleting workflows
on the local filesystem and any remote install targets.
It follows any symlink directories specified in
(see A note on symlink directories below). You can also use
cylc clean to
just delete certain files or subdirectories (see Cleaning specific subdirectories or files below).
If you’ve used
rose suite-clean before, the functionality is similar, but
cylc clean is intended for use on workflows installed with
cylc install. If you clean a workflow that was instead written
directly in the cylc-run directory and not backed up elsewhere,
it will be lost.
Simple example of using
$ cylc clean myflow/run1 INFO - Removing directory: ~/cylc-run/myflow/run1
Cleaning on remote install targets
If any jobs in your workflow ran on a remote platform, Cylc will automatically remove the workflow files on there in addition to the local filesystem.
$ cylc clean remote-example INFO - Cleaning on install target: enterprise1701 INFO - [enterprise1701] INFO - Removing directory: /home/user/cylc-run/remote-example/run1 INFO - Removing directory: ~/cylc-run/remote-example/run1
This relies on determining which platforms were used from the workflow database. If the platforms recorded in the database are out of date with the global configuration, or if the database is missing altogether, you will have to manually remove the files on remote install targets.
You can also clean on just the local filesystem using the
or just the remote install target using the
Cleaning specific subdirectories or files
You can clean specific subdirectories or files inside a run directory using
--rm option (we refer to this as a targeted clean).
For example, to remove the
$ cylc clean myflow --rm log --rm work
Colons can be used to delimit the items to clean, so the following is equivalent:
$ cylc clean myflow --rm log:work
You can also use globs. E.g., to remove all job logs for cycle points
$ cylc clean myflow --rm 'log/job/2020*'
Make sure to place glob patterns in quotes.