Skip to main content

1E 8.1 (on-premises)

CacheCleaner.exe command-line switches

CacheCleaner is an executable that can be used to explicitly purge the Nomad cache. By default, the Nomad cache is not purged unless there is an active download. In most cases, available disk space is not really an issue, but there may be circumstances where you may want to manage the cache to keep the disk usage overhead to a minimum. Please refer to Cache management for further information about managing the cache.

It is installed as part of Nomad and the format of the command-line is:

CacheCleaner.exe -switch

Where switch is one of the following (case sensitive):

Switch name

Default value

Range

Description

-CachePriority

1

1-9

Only cache contents with a priority equal to or lower than the CachePriority are purged. Used in conjunction with Pkgsize to emulate the behavior of the cache cleaner when an actual package is being downloaded.

-Debug

Sets the debug level for CacheCleaner and it can be passed on the command-line. If it is not, the value from Nomad registry is used. If Debug is already defined, using this argument adds to the logging level.

-Deleteall

Deletes all cache content where the priority is less than or equal to the value for Force. If the command-line does not include Force , then Deleteall deletes all cache content where the priority is 1. Works in conjunction with the Force .

-DeletePkg

The ID of the package or content to be deleted from the cache. The value must be set to the PackageID or ContentID string that identifies the content to be deleted. Must be used in conjunction with PkgVer.

-DeletePkg=PRI0000A -PkgVer=*
-DeletePkg=Content_9b9ccd56-9fbf-4587-98e7-725fcfa8e70f -PkgVer=*

-Force

Content whose cache priority is less than or equal to the CachePriority value are purged. Used in conjunction with the Deleteall and MaxCacheAge.

-MaxCacheAge

1-1461

The maximum number of days before the contents of a cache is purged. If set, CacheCleaner deletes cache contents which are older than this value.

This argument is ignored if DeletePkg and Deleteall is used on the command-line.

If the command-line includes Force, all caches with a priority less than or equal to CachePriority will have their content purged. If CachePriority is not included on the command-line, all caches with a priority=1 will have their content purged.

-PercentAvailableDisk

10

1-99

Deletes the lowest cache priority content until the set percentage of available disk is available.

-Pkgsize

Only caches with a priority equal to or lower than the CachePriority value will have their contents purged. Used in conjunction with CachePriority to emulate the behavior of the cache cleaner when an actual package is being downloaded.

Determine the space to be cleared when running cachecleaner.exe with PercentAvailableDisk. The PkgSize value is by default specified in bytes but can be set to MB by appending MB to the value.

For example, the following are equivalent:

-Pkgsize=1048576
-Pkgsize=1MB

-PkgVer

Identifies the content version to be deleted and must be used in conjunction with DeletePkg. Deletes content from both the Nomad and Configuration Manager client caches that corresponds to the version number and the Package ID (or Content ID).

The special value -PkgVer=* may be used when the user is unsure of the specific version of the package in the cache.

Note

Setting -PkgVer=* will delete any version of the content with the ID specified in the DeletePkg argument from the Nomad cache only – it will not delete from the Configuration Manager client cache.

Note

If you want to remove Application or Software Updates content, then the -PkgVer will usually need to be set to "1".

Note

If the Nomad cache is deleted while another client is accessing it, the other client will recover by downloading directly from the DP. This is by design and ensures recovery occurs in order to complete a successful download.

CacheCleaner examples

In the following examples, there is no requirement to specify the path to CacheCleaner.exe because the path to Nomad executables is set in the PATH environment variable:

Example

Description

Set the cache cleaner to run as a Configuration Manager program.

You can set the cache cleaner to run as a Configuration Manager program and advertise it to all Nomad systems in a single operation. You can also schedule this as a regular housekeeping job, ensuring that the cache is kept under control automatically.

To purge the cache when the total free disk space is at 20% run:

CacheCleaner.exe –PercentAvailableDisk=20

Ensure that content in the cache is not kept for more than 30 day.

To ensure that content in the cache is not kept for more than 30 days, run:

CacheCleaner.exe –MaxCacheAge=30

Delete a particular package and version.

To delete a particular package and version, run:

CacheCleaner.exe –DeletePkg=L0A00001 –PkgVer=1

Purge the contents of a cache with a priority of 3 or lower.

To purge the contents of a cache with a priority of 3 or lower, run:

CacheCleaner.exe –DeleteAll -Force=3

Purge the contents of a cache with a particular priority and size.

To purge the contents of a cache with a particular priority and size, run:

CacheCleaner.exe –PkgSize=10485760 –CachePriority=6