---
updatedAt: 2026-10-01T10:06:06.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/administration/llms.txt
---

# Cleanup Policies

Cleanup removes files, applications, and configurations to free up storage and improve system performance. Regular cleanup helps optimize disk space and maintain system efficiency.

<Image src="https://files.readme.io/1df7a3f4d2bdb1bb73a0533cb86aa0b801858928542c015c0c240ae21093e656-uuid-9488e58c-8792-4b4c-535f-99d182e9b035.png" alt="Artifactory_Cleanup.png" align="center" border={true} />

JFrog cleanup policies remove stale data based on specific criteria. Platform and Project Administrators define custom cleanup policies to identify package, release bundles, or builds that are candidates for removal. This automates cleanup processes that align with organizational needs by customizing these policies.

## Key Benefits

* **Improved Efficiency**
* Optimizes platform performance and loading times.
* **Enhanced User Experience**

  Simplifies navigation by reducing the number of items, saving time and improving overall user experience.
* **Reduced Storage Costs**

  Frees up storage space by removing unnecessary items, helping to reduce costs.

<Callout icon="🐸" theme="default">
  ###

  For more information, see **[Cleanup Policies](https://academy.jfrog.com/streamline-your-workflow-the-new-cleanup-policy)** at JFrog Academy.
</Callout>

## Prerequisites

* **Subscription**: See the Subscription Information note in the Cleanup Policies Overview section.

- **Administrator Access**: Platform or Project Administrator
- **Project Context**

  * **Platform Admins** can manage cleanup policies globally across all projects or for specific projects.
  * **Project Admins** can manage policies within their project scope, with visibility into global policies affecting their projects.

## Cleanup Policies Overview

There are 3 types of cleanup policies:

* **Package Cleanup Policies** define which Packages to delete.
* **Release Bundles V2 Cleanup Policies** define which Release Bundles V2 to delete.
* **Build Cleanup Policies** define which Builds to delete.

For supported package types, see [Cleanup Supported Packages](#cleanup-supported-packages).

Package cleanup policies support a multi-select condition framework. You can combine all three time-based, property-based, and version-based criteria into a single cleanup policy. This lets you target stale or tagged packages for deletion while protecting the last N versions as a safety rail against accidental removal.

<Callout icon="📘" theme="info">
  ###

  **Subscription Information**

  - **Package cleanup policies**  are supported on the **SaaS (7.98.2)** and **Self-Hosted (7.98.7)** platforms, with an **Enterprise+**  or **Enterprise X (7.139.1 SaaS, 7.146.7 SH)** subscription.
  - **Release Bundle V2 Cleanup policies** are supported on the **SaaS (7.104.2)** and **Self-Hosted (7.104.5)** platforms, with an **Enterprise+**  or **Enterprise X (7.139.1 SaaS, 7.146.7 SH)** subscription.
  - **Build Cleanup policies** are supported on the **SaaS (7.125)** and **Self-Hosted (7.125)** platforms, with an **Enterprise+** or **Enterprise X (7.139.1 SaaS, 7.146.7 SH)** subscription.
</Callout>

<Callout icon="📘" theme="info">
  ###

  **Note**

  When you clean up Packages, Builds and Release Bundles (RB V2) that have associated evidence, the evidence is also permanently deleted.
</Callout>

## Running Cleanup Policies

You can schedule hourly, daily, weekly, or monthly execution of a cleanup policy. You can also define time periods when execution is stopped. This enables you to perform cleanup during weekends or maintenance windows.

If required, you can run the cleanup policy manually. For more information, see the [Run Cleanup Policy Manually](#run-cleanup-policy-manually).

As the cleanup process progresses, the system generates detailed logs in the [Artifactory service logs](/docs/log-files-location-and-naming#service-log).

## Cleanup Limitations

The following limitations currently apply when you run a Packages Cleanup Policy:

**Supported Repositories**

* Supports Local and Federated repositories. Does not support Remote and Virtual repositories.

<Callout icon="📘" theme="info">
  ###

  **Note**

  When cleaning Federated repositories, the run (dry or actual) can take significantly longer compared to Local repositories. This is because the cleanup workflow must check the last download status of each package across all federation members. The more members involved, the longer the process will take.

  **Recommendations to Optimize Cleanup:**

  - **Adjust Policy Conditions**: Narrow the scope of your cleanup policies to reduce the number of packages to be deleted in each run. This can significantly speed up the run.
  - **Increase Run Frequency**: Run cleanup policies more often to process smaller sets of packages. This helps prevent large backlogs and improves long-term performance.
</Callout>

**Push-Replicated Repositories**

A package cleanup policy can include a local repository configured for remote push replication. The policy does not exclude these repositories.

<Callout icon="❗️" theme="error">
  ###

  **Warning**

  Deletions from that repository will be replicated to the remote targets.
</Callout>

**Package Verification**

There is no verification if packages are part of a Release Bundle or build. A package-level Cleanup policy may impact build or release bundle promotion.

**Cleanup Limits**

Cleanup policy can delete up to 100,000 packages in a single run.

**Progress Notifications**

Notifications on the progress of a cleanup policy run are unavailable.

**Visibility of Run Results**

Run results for global policies are visible only to Platform admins globally.

**Search**

A project admin can only perform searches within their project context and does not have access to the global scope.

**Include Path Patterns**

If you add only the last folder in **Include Path Patterns**, the policy finds no packages. The last folder is the one that holds the file. The policy still finds nothing even if the full path includes that folder name. Add at least one parent folder as well. Include path patterns are available from Artifactory 7.146.x, and this limitation applies when you use them.

**Artifactory Configuration**

The Artifactory Instance can only be a Platform or a Mothership, not an Edge.

**Concurrent Execution and Queuing of Cleanup Policies**

* Cleanup Policies can run concurrently up to a specified maximum. When this limit is reached, additional triggered policies are queued. Any further triggered policies will be skipped entirely if the queue reaches its maximum capacity.
* In the current version of Artifactory, queued or skipped policy runs do not appear in the Runs view. You can find a log of skipped policies in the Artifactory Service log. For example, you might see a message like: `"Policy: test_policy run: 1 has been rejected since 3 concurrent runs are already in progress."`.

The following limitations currently apply when you run a Release Bundle V2 policy:

**Distributed Release Bundles**

* Cleanup policies will not delete distributed release bundles.

**Source Artifacts**

The source of release bundles, including associated builds and artifacts, will not be deleted.

## Cleanup Known Issues

The following Known Issues were found in the Packages Cleanup Policy:

**Editing Existing Cleanup Policy - Time-based Policy Conditions**

When you edit a Cleanup Policy created before 7.111, you cannot modify settings for the following  **Time-based** Policy Conditions:

* Packages Older Than
* Packages Not Downloaded Since

  Workaround: Create a new cleanup policy for the packages and configure it according to your needs.

**Debian Package**

When Debian packages are uploaded directly to the root directory, all packages may be cleaned during cleanup actions.

<Callout icon="📘" theme="info">
  ###

  **Impact**

  Only the **Version-based** condition is affected by this issue. The **Time-based** condition remains unaffected.
</Callout>

Workaround: To avoid unintended cleanup, always upload Debian packages to a subdirectory rather than the root.

For more information, see [Artifactory 7.98 Known Issues](/releases/docs/artifactory-known-issues#artifactory-798-known-issues).

**SBT Package**

When SBT packages are uploaded with the `sbt-default` repository layout, they are not resolved during cleanup actions.

Workaround: Choose **Recommended Repository Layouts** as described in the [sbt Repository Layouts](/artifactory/docs/repository-layouts).

## Cleanup Supported Packages

This topic outlines the supported packages with cleanup. It includes the policy conditions that apply to each package type.

<table>
  <thead>
    <tr>
      <th>Package Type</th>
      <th>Supported Release Version</th>
      <th>Lead Artifact</th>
      <th>Age (Packages Older Than)</th>
      <th>Usage (Packages Not Downloaded Since)</th>
      <th>Version (Number of Latest Versions to Keep)</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><strong>Agent Plugins</strong></td>
      <td>7.157</td>
      <td>.zip</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Alpine</strong></td>
      <td>7.111.0</td>
      <td>.tar.gz, .apk</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Ansible</strong></td>
      <td>7.104.2</td>
      <td>tar.gz</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Bower</strong></td>
      <td>7.162</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Cargo (Rust)</strong></td>
      <td>7.102.0</td>
      <td>.crate</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Chef</strong></td>
      <td>7.112</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>CocoaPods</strong></td>
      <td>7.99.1</td>
      <td>.tar.gz, .tgz</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Composer</strong></td>
      <td>7.116</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Conan</strong></td>
      <td>7.98.2</td>
      <td>conanfile.py</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Conda</strong></td>
      <td>7.105.2</td>
      <td>tar.bz2</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>CRAN</strong></td>
      <td>7.162</td>
      <td>.tar.gz</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Debian</strong></td>
      <td>7.98.2</td>
      <td>.deb, .ddeb</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Docker</strong></td>
      <td>7.98.2</td>
      <td>manifest.json</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td><img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" /><br />Note: Supported from V 7.115.1</td>
    </tr>

    <tr>
      <td><strong>Gems</strong></td>
      <td>7.96.3</td>
      <td>.gem</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Generic</strong></td>
      <td>7.98.2</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Go</strong></td>
      <td>7.98.2</td>
      <td>.mod</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Gradle</strong></td>
      <td>7.98.2</td>
      <td>.pom</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Helm</strong></td>
      <td>7.98.2</td>
      <td>.tgz</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Helm OCI</strong></td>
      <td>7.102.0</td>
      <td>manifest.json</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td><img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" /><br />Note: Supported from V 7.115.1</td>
    </tr>

    <tr>
      <td><strong>Hex</strong></td>
      <td>7.111.0</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>HuggingFaceML</strong></td>
      <td>7.100.0</td>
      <td>.jfrog\_huggingface\_model\_info.json, .jfrog\_huggingface\_dataset\_info</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Machine Learning</strong></td>
      <td>7.104.2</td>
      <td>model-manifest.json</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Maven</strong></td>
      <td>7.98.2</td>
      <td>.pom</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Nix</strong></td>
      <td>7.162</td>
      <td>narInfo</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>npm</strong></td>
      <td>7.98.2</td>
      <td>.tgz</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>NuGet</strong></td>
      <td>7.98.2</td>
      <td>.nupkg</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>OCI</strong></td>
      <td>7.102.0</td>
      <td>manifest.json</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td><img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" /><br />Note: Supported from V 7.115.1</td>
    </tr>

    <tr>
      <td><strong>Puppet</strong></td>
      <td>7.112</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>PyPI</strong></td>
      <td>7.98.2</td>
      <td>tar.gz, tgz, gz, whl, egg, bz2</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>RPM | YUM</strong></td>
      <td>7.98.2</td>
      <td>.rpm</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>SBT</strong></td>
      <td>7.108</td>
      <td>.pom, .xml</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Swift</strong></td>
      <td>7.114.1</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Terraform</strong></td>
      <td>7.99.1</td>
      <td>.zip</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Terraform BE</strong></td>
      <td>7.103.0</td>
      <td>.json</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>

    <tr>
      <td><strong>Vagrant</strong></td>
      <td>7.111.0</td>
      <td>&ndash;</td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>

      <td>
        <img src="https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg" />
      </td>
    </tr>
  </tbody>
</table>

<Callout icon="📘" theme="info">
  ###

  **Note**

  Several package types consist of multiple underlying files. The package-level cleanup policy determines if the entire package should be removed by checking the statistics or metadata of the lead artifact. For example, in a Maven package, the policy checks the statistics of the .pom file. If the file meets the criteria, the entire package is eligible for cleanup.
</Callout>

### Docker Image Cleanup

Docker images can have multiple tags and use `list.manifests` to support different architectures. Each `list.manifest` points to several specific manifests for various systems.

**Learn how the policy executes for the following conditions:**

* **Time-based Condition**: Time-based conditions delete images and tags that have not been used within a certain period. This helps keep the connections between tags intact and ensures the stability of multi-architecture references. We recommend using the **Packages Not Downloaded Since** condition to prevent the deletion of images that are currently in use.

* **Version-based Condition**: From Artifactory V 7.115.1, Artifactory supports Version-based policy conditions for Docker. It allows you to keep a specified number of versions per image, which considers the structure of Docker images when deciding what to delete. If a Docker image is a `list.manifest`, it will either be deleted with all of its related sub-manifests or not deleted at all. This approach maintains the relationships between images. This provides greater control over image management and helps maintain tag relationships and multi-architecture references.

  You can combine **Keep Last N Versions** with time-based and property conditions in a single policy. The last N versions are never deleted, even if they match the other conditions.

  On the other hand, time-based conditions treat each manifest and `list.manifest` separately, without considering their hierarchical structure. Each one is evaluated independently based on its status.

<Callout icon="📘" theme="info">
  ###

  **Note**

  - **[Tag Retention Logic](/artifactory/docs/docker-repositories#tag-retention-logic)**: When this logic is enabled, previous tag revisions (tag retentions) will be removed only when the most recent revision of a tag is deleted.
  - [**Max Unique Tags Logic**](/artifactory/docs/docker-repositories#use-max-unique-tags): When this logic is enabled, the Last N Versions policy will take precedence.

    **Example**: With Last N Versions set to 2 and Max Unique Tags set to 5, retains only 2 versions/tags of the same image after the policy is executed.
</Callout>

<Callout icon="❗️" theme="error">
  ###

  **Avoid Policies with Conflicting Criteria**

  We recommend that you avoid configuring **separate** cleanup policies with conflicting criteria (for example, one policy with **Keep Last N Versions** and another with **Packages Not Downloaded Since**) for the same Docker, OCI, or Helm OCI repository. Instead, combine time, property, and version conditions in a single policy by selecting multiple conditions from the multi-select group.
</Callout>

## Getting Started with Cleanup

This topic outlines how to get started with Cleanup. It includes granting permission to a project admin, working with cleanup, and monitoring cleanup operations.

<Image src="https://files.readme.io/64e41cd66c069dd5e4c7300f4f129870dfdd72b18e6b19a9188b3d46bc6ca352-uuid-fd557bd4-a2bc-59eb-2ac8-26d773dee66c.png" alt="Cleanup_GS.png" align="center" border={true} />

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        #
      </th>

      <th>
        Task
      </th>

      <th>
        Description
      </th>

      <th>
        Reference Links
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        1
      </td>

      <td>
        **Grant Permission to a Project Admin to Create and Edit Cleanup Policies**
      </td>

      <td>
        This topic outlines how to grant permission to a project admin. Platform admins can enforce and manage cleanup policies across multiple projects or all projects on the JFrog platform and thereby gain full control over organizational storage management (Global Policies). Platform admins can also delegate permissions to Project admins to manage policies on their project scope only (Project Policies), and Project admins have visibility on Global Policies affecting their projects.
      </td>

      <td>
        [Grant Permission to a Project Admin](#grant-permission-to-a-project-admin)
      </td>
    </tr>

    <tr>
      <td>
        2
      </td>

      <td>
        **Work with Cleanup**
      </td>

      <td>
        This section outlines working with cleanup. It includes creating and managing cleanup policies and managing cleanup runs.
      </td>

      <td>
        [Work with Cleanup](#work-with-cleanup)
      </td>
    </tr>
  </tbody>
</Table>

<Image src="https://files.readme.io/86e0572fc0eee5c62deed4fa4cbb7f2f057ecaf37078602bb7ac555c73a815cc-uuid-3fdf2b86-42fe-316b-0013-e46d204678cb.png" alt="Ideal_Cleanup_Workflow.png" align="center" border={true} />

1. [Create Cleanup Policy](#create-cleanup-policy)
2. [View All Cleanup Policies](#view-all-cleanup-policies)
3. [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy)
4. [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy)
5. [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy)
6. [Run Cleanup Policy Manually](#run-cleanup-policy-manually)

## Cleanup - User Activities and Authorizations

This topic outlines cleanup user activities and their authorizations.

### Grant Permission to Project Admin

| Activity                                                                    | Platform Admin                                                                                                                              | Project Admin                                                                                                                               | Non-admin User                                                                                                                              |
| :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ |
| [Grant Permission to a Project Admin](#grant-permission-to-a-project-admin) | ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg) | ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg) | ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg) |

### [Create Cleanup Policy](#create-cleanup-policy)

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [Create Cleanup Policy](#create-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note**: Only from allocated projects
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

### [Manage Cleanup - Policies](/docs/cleanup-policies#manage-cleanup-policies)

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin

        **Note:** Applicable within the scope of your project context.
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [Edit Cleanup Policy](#edit-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Run Cleanup Policy Manually](#run-cleanup-policy-manually)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Edit Cleanup Policy](#edit-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop a Running Cleanup Policy](#stop-a-running-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Delete Cleanup Policy](#delete-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Disable All Cleanup Policies](#disable-all-cleanup-policies)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note:** This option is shown from the Global Context only.
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Search Cleanup Policy](#search-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note:** This option is shown from the Global Context only.
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

### [Manage Cleanup - Runs](#manage-cleanup---runs)

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin

        **Note:** Applicable within the scope of your project context.
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [View All Cleanup Runs](#view-all-cleanup-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Download and Review Cleanup Run Report](#download-and-review-cleanup-run-report)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

Depending on your role, you can perform the operations described in this section within the following contexts:

**Global Context**

<GlobalContext />

**Project Context**

<ProjectContext />

## Grant Permission to a Project Admin

This topic outlines how to grant permission to a project admin. Platform admins can enforce and manage cleanup policies across multiple projects or all projects on the JFrog platform and thereby gain full control over organizational storage management (Global Policies). Platform admins can also delegate permissions to Project admins to manage policies on their project scope only (Project Policies), and Project admins have visibility on Global Policies affecting their projects.

**Global Policy**: For maintaining consistent cleanup policies across multiple projects, ensuring compliance and standardization.

* **Scope**: Applies to all packages across the entire Artifactory instance.
* **Configuration**: Set by platform administrators and affects all projects at global level.

**Project Policy**: For addressing unique cleanup policies for a project that differ from the global standard, allowing flexibility to project administrators.

* **Scope**: Applies to individual projects.
* **Configuration**: Set by project/platform administrators for specific needs and requirements of a project.

**To grant permissions to project admins:**

1. From the **Administration** module, click **Projects**.
2. In the Projects screen, select the project where you want to give permissions to the Project Admin.

   The project details appear in read-only mode.
3. Click **Edit Settings** in the upper right of the project details screen.
4. Go to the section **Project Admins**, and then click **Manage Resources**.
5. Add the user to the project from the **Users** tab.
6. Click **Save**.

## Work with Cleanup

This section outlines working with cleanup. It includes creating and managing cleanup policies and managing cleanup runs.

![Cleanup\_Workflow.png](https://files.readme.io/0f077abb2ccea1af888e9755ce47826045960d684419f7d030b7dc5f5185a9f2-uuid-40bc70ac-bdd7-e838-26cd-85f1c411f2c7.png)

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        #
      </th>

      <th>
        Task
      </th>

      <th>
        Description
      </th>

      <th>
        For UI, see...
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        1
      </td>

      <td>
        **Create Cleanup Policy**
      </td>

      <td>
        This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended packages, builds and release bundles V2 in Artifactory.
      </td>

      <td>
        [Create Cleanup Policy](#create-cleanup-policy)
      </td>
    </tr>

    <tr>
      <td>
        2
      </td>

      <td>
        **Manage Cleanup - Policies**
      </td>

      <td>
        This section outlines the actions you can perform on the Cleanup Policies in Artifactory. It includes enable/disable, search, manual run, dry run, edit, stop, delete, view and delete policies.
      </td>

      <td>
        [Manage Cleanup - Policies](/docs/cleanup-policies#manage-cleanup-policies)
      </td>
    </tr>

    <tr>
      <td>
        3
      </td>

      <td>
        **Manage Cleanup - Runs**
      </td>

      <td>
        This section outlines the actions you can perform on the Cleanup Runs in the Artifactory. It includes view, stop all runs and downloading run reports.
      </td>

      <td>
        [Manage Cleanup - Runs](#manage-cleanup---runs)
      </td>
    </tr>
  </tbody>
</Table>

### Create Cleanup Policy

This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended packages, builds and release bundles V2 in Artifactory.

| Task                                           | Description                                                                                                                            | For UI, see...                                                                         | For API, see...                                                                                          | For Terraform, see...                                                                                                                                                                                                 |
| :--------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create Cleanup Policy - Packages**           | This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended packages in Artifactory.          | [Create Cleanup Policy - Package](#create-cleanup-policy--package)                     | [Create a Package Cleanup Policy API](/administration/reference/createpackagecleanuppolicy)              | <Anchor target="_blank" href="https://registry.terraform.io/providers/jfrog/artifactory/latest/docs/resources/package_cleanup_policy">artifactory\_package\_cleanup\_policy (Resource)</Anchor>                       |
| **Create Cleanup Policy - Release Bundles V2** | This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended Release Bundle V2 in Artifactory. | [Create Cleanup Policy - Release Bundle V2](#create-cleanup-policy--release-bundle-v2) | [Create a Release Bundle Cleanup Policy API](/administration/reference/createreleasebundlecleanuppolicy) | <Anchor target="_blank" href="https://registry.terraform.io/providers/jfrog/artifactory/latest/docs/resources/release_bundle_v2_cleanup_policy">artifactory\_release\_bundle\_v2\_cleanup\_policy (Resource)</Anchor> |
| **Create Cleanup Policy - Build**              | This topic outlines how to create a cleanup policy for builds. You create a cleanup policy to delete unintended builds in Artifactory. | [Create Cleanup Policy - Build](#create-cleanup-policy--build)                         | [Create Build Cleanup Policy API](/administration/reference/createbuildcleanuppolicy).                   |                                                                                                                                                                                                                       |

**Authorization**

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [Create Cleanup Policy](#create-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note**: Only from allocated projects
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

### Create Cleanup Policy – Package

This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended packages in Artifactory.

**To create a Package Cleanup Retention policy:**

1. From the **Administrator** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, from the **Create Policy** dropdown list, click **Cleanup Policy**.

   <Image src="https://files.readme.io/22b93dc963878ff4e527f48a40e331bd49c03ea24688f55c0c7dd0cc98c92f5d-Cleanup_select-Cleanup-Policy.png" align="center" width="80% " border={true} />

3. In the **Create New Cleanup Policy** page, select **Package**.

   <Image src="https://files.readme.io/1ae426bb8088471242cb8e08e5c5cb73cb52a79df2834fcea0f7dfae332f10fb-Cleanup-policy_select-Package.png" align="center" width="80% " border={true} />

4. Configure the following in the **Create New Cleanup Policy** page:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        _Policy Name_
      </td>

      <td>
        Enter a unique and meaningful name for the policy.
      </td>
    </tr>

    <tr>
      <td>
        _Description_
      </td>

      <td>
        Enter information regarding why this policy was created, and details that help users understand its configuration.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Scope**

        Define what should be deleted.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Include Stages / Include All Stages_
      </td>

      <td>
        Select the [stages](/docs/stages-lifecycle) to which the policy should apply, or choose **Include All Stages** to run the policy across all stages on the platform.
      </td>
    </tr>

    <tr>
      <td>
        _Include Projects / Include All Projects_
      </td>

      <td>
        <Callout icon="📘" theme="info">
          ###

          **Note**

          This setting is applicable only at the global level for Platform Admins. It does not appear when creating a policy at the project level. When this setting is visible, it is mandatory.
        </Callout>

        Select the projects to which the policy should apply, or choose **Include All Projects** to run the policy across all projects on the platform. You can also select **Unassigned Repositories** to apply the policy to repositories not linked to any projects.
      </td>
    </tr>

    <tr>
      <td>
        _Package Types_
      </td>

      <td>
        Select one or more of the package types you want to delete.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          If a policy includes a repository with retention settings, packages designated for retention may be inadvertently deleted.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Include Repository Patterns_
      </td>

      <td>
        - Enter one or more patterns or explicit repository names for the repository selection where you want the cleanup policy to apply. Alternatively, you can select **Include All Repositories** or specify explicit repository names. At least one pattern or explicit name is required, as only packages in repositories matching these will be deleted.

        - Auto-complete will suggest options based on the project and package type, and both local and federated repositories are supported.

        **Warning** If the policy includes a local repository configured for remote push replication, deletions will be replicated to the remote targets.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `npm-local*` includes all repositories starting with **npm-local**.

          Regex is not supported.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Exclude Repository Patterns_
      </td>

      <td>
        Enter one or more patterns or explicit repository names to exclude from the cleanup policy. Auto-complete will suggest options based on the project and package type.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `npm-local*` excludes all repositories starting with npm-local.

          Regex is not supported.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Include Path Patterns_
      </td>

      <td>
        (Optional) Enter one or more folder paths to include in the cleanup policy. Use this option to narrow the policy scope to specific repository paths within the defined repositories.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `npm-local*` excludes all repositories starting with npm-local.

          Regex is not supported.

          If you add only the last folder in **Include Path Patterns**, the policy finds no packages. The last folder is the one that holds the file. Add at least one parent folder as well.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Exclude Path Patterns_
      </td>

      <td>
        (Optional) Enter one or more folder paths to exclude from the cleanup policy. Use this option to include all packages within the defined repositories _except_ for the packages whose path matches the exclude patterns.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `npm-local*` excludes all repositories starting with npm-local.

          Regex is not supported.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Include Package Name Pattern_
      </td>

      <td>
        Enter a pattern for a package name or an explicit package name for the cleanup policy, then click **Add** or select **Include All Packages**. Only one pattern or explicit name is allowed.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `mypackage*` includes all packages starting with mypackage.

          Regex is not supported.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Exclude Package Name_
      </td>

      <td>
        Enter explicit package names to exclude from the policy and click **Add**. Only explicit names are accepted and not patterns.
      </td>
    </tr>

    <tr>
      <td>
        _Include Package Version Pattern_
      </td>

      <td>
        Enter a pattern for a package version or an explicit package version for the cleanup policy.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          **Set Patterns**: Use wildcards at the end to match any suffix, or at the start to match any prefix.

          **For example**, `1.0.*` includes all packages starting with 1.0.

          Regex is not supported. Only 1 pattern or explicit version can be entered.
        </Callout>

        Available from V 7.127 (SaaS) and V 7.125.7 (Self-managed).
      </td>
    </tr>

    <tr>
      <td>
        _Exclude Package Version Patterns_
      </td>

      <td>
        Enter explicit package version to exclude from the policy. Only explicit versions are accepted and not patterns.

        Available from V 7.127 (SaaS) and V 7.125.7 (Self-managed).
      </td>
    </tr>

    <tr>
      <td>
        **Policy Conditions**

        Define under what conditions the policy finds packages.
      </td>

      <td>
        Select **one or more** conditions from the multi-select group. Time, property, and version criteria are evaluated using logical **AND**. The policy targets packages that meet all selected time and property conditions and fall outside the protected version history.

        - **Packages Older Than**
        - **Packages Not Downloaded Since**
        - **Property**
        - **Keep Last N Versions**


      </td>
    </tr>

    <tr>
      <td>
        Policy Condition Details
      </td>

      <td>
        Select **one or more** of the following conditions:

        - **Packages Older Than**: Deletes packages based on their creation date, regardless of whether they have been downloaded.
        - **Packages Not Downloaded Since**: Deletes packages based on their last download date. The default is 2 years. If a package was never downloaded, it is deleted only if its creation date is older than the specified **Not Downloaded Since** period. We recommend using this condition to prevent the cleanup of packages currently in use.
        - **Property**: Deletes packages based on a property key-value pair applied to the lead artifact. For more information, see [Cleanup Supported Packages](#cleanup-supported-packages).
        - **Keep Last N Versions**: Defines the number of latest versions to keep for each package. The cleanup policy evaluates this condition independently per package. It doesn't apply a single N-version cap across all packages under a selected include path. The N most recent versions of each package are excluded from deletion. The latest version is always excluded. When combined with time or property conditions, only packages that meet those criteria **and** fall outside that package's retained version set are deleted.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          A day in this context is a 24-hour period from the moment the policy is executed. Other units are calculated as follows:

          - 1 week = 7 days
          - 1 month = 30 days
          - 1 year = 365 days

          The system will convert them to appropriate time unit if the matching value is entered. For example, if you enter 7 days, the system changes it to 1 week.
        </Callout>

        <Callout icon="📘" theme="info">
          ###

          **Notes**

          - Versions are determined by creation date.
          - **Keep Last N Versions** is evaluated independently for each package, not globally across a selected folder path. Include path patterns only decide which packages are in scope. They don't merge those packages into one version pool. A package isn't fully removed just because another package under the same path has newer versions.
          - Not all package types support this condition. For more information, see [Cleanup Supported Packages](#cleanup-supported-packages).
          - If your cleanup policy includes a version-based condition (for example, keep last N versions), be aware that a <Anchor target="_blank" href="https://github.com/helm/helm/issues/30911">change in behavior</Anchor> in Helm client 3.18.0 and later causes Helm to create two manifest nodes per version. One is for the tag and one is for the digest. This affects any OCI-compliant repository where Helm charts are stored, including Helm OCI and Docker repositories. Since Artifactory counts each manifest node as a separate version, the policy may retain digest references instead of the human-readable tags used for consumption.
        </Callout>

        **Behavioral logic when multiple conditions are selected**

        All selected conditions are evaluated together using logical **AND**:

        - If you select both **Packages Older Than** and **Packages Not Downloaded Since**, the policy deletes only packages that meet both conditions. Packages that have never been downloaded are deleted only if their creation date is older than the **Packages Older Than** value.
        - If you also select **Keep Last N Versions**, the last N versions of each package are never deleted, even when they meet the time and property criteria. This acts as a safety rail to prevent total depletion of a package's version history.
        - When **Property** is selected with time-based conditions, packages must match the property **and** satisfy the selected time criteria to be eligible for deletion.

        **Example:** You select **Packages Older Than** 12 months, **Property** `prod=true`, and **Keep Last 5 Versions**. The policy deletes only packages that are older than 12 months and have the property `prod=true`, and are not among the five most recent versions of their package.
      </td>
    </tr>

    <tr>
      <td>
        _Exclude based on property_
      </td>

      <td>
        Enable the checkbox and enter the property name and value applied to the lead artifact of a package. Packages with this property will be **excluded** from deletion. For more information, see [Cleanup Supported Packages](#cleanup-supported-packages).
      </td>
    </tr>

    <tr>
      <td>
        **Settings**
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Cron Expression_
      </td>

      <td>
        A cron expression is a string comprised of five or six fields separated by spaces. Each field represents a different unit of time, which collectively defines the schedule for policy execution. The standard format is as follows:

        ```
        * * * * * *     (Seconds - Optional)
        | | | | | |
        | | | | | +---- Day of the week (0 - 6) (Sunday=0)
        | | | | +------ Month (1 - 12)
        | | | +-------- Day of the month (1 - 31)
        | | +---------- Hour (0 - 23)
        | +------------ Minute (0 - 59)
        +-------------- Second (0 - 59) (Optional)
        ```

        <Callout icon="📘" theme="info">
          ###

          **Note**

          This cron expression must follow the Quartz scheduler format as used in the CronTrigger class. It differs from the standard Unix cron format. For example, Quartz supports a sixth optional field for seconds and uses **?** for non-specific values. For more information, see <Anchor target="_blank" href="https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#:~:text=or%20mailing%20list.-,Format,-A%20cron%20expression">Quartz Cron Expression Format</Anchor>.
        </Callout>

        **Example Cron Expression**

        To illustrate how to construct a cron expression, consider the following example:

        **Expression**: `0 0 2 * * ?`

        - 0 - At second 0
        - 0 - At minute 0
        - 2 - At hour 2 (2:00 AM)
        - - - Every day of the month
        - - - Every month
        - ? - No specific value for the day of the week

        This expression schedules the policy to run every day at 2:00 AM.

        **Guidelines for Scheduling**

        - **Run Interval**: The minimum interval between policy executions is 6 hours. If you attempt to set a cron expression that results in a runtime shorter than this duration, you will encounter an error when saving the configuration.
        - **Off-Hours Scheduling**: It is recommended to tune your cron expression so that policies run during off-hours. This helps to reduce the impact on system performance during peak usage times.

        **Leaving the Cron Expression Empty**: If you leave the cron expression empty, you can only [Run Smart Archiving Policy Manually](/docs/archive#run-smart-archiving-policy-manually) manually. This means that there will be no automatic scheduling and the policy will not run unless you initiate it.
      </td>
    </tr>

    <tr>
      <td>
        _Max Run Duration_
      </td>

      <td>
        This setting limits the maximum duration the policy can run when enabled. The maximum allowed duration is 5 hours.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          The policy stops before the completion of the run if it exceeds the applied run duration. In one run, within this duration, it deletes all or part of your packages depending on the size and number of items. If there are any pending packages to be deleted, they are deleted incrementally in the next scheduled run and the subsequent runs.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Skip Trash Can_
      </td>

      <td>
        When enabled, this setting will cause packages to be permanently deleted from the Artifactory instance without an option to restore them immediately after the cleanup policy is executed, bypassing the Trash Can repository.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          If you want deleted items to be transferred to the trash can, you must enable the global Trash Can setting. For more information, see [Trash Can Settings](/installation/docs/general-settings#trash-can-settings).
        </Callout>
      </td>
    </tr>
  </tbody>
</Table>

5. Click **Save** to save the policy.

   If the policy includes a local repository configured for remote push replication, deletions will be replicated to the remote targets.

   The newly created cleanup policy appears in the **Policies** list and executes on the scheduled date and time.

   * [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy): This feature allows you to see which items would be deleted without actually deleting them. We recommend performing a dry run and reviewing the results before enabling a policy.
   * [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy): The policy must be enabled to run automatically according to the schedule or [Run Cleanup Policy Manually](#run-cleanup-policy-manually) manually.

### Create Cleanup Policy – Release Bundle V2

This topic outlines how to create a cleanup policy. You create a cleanup policy to delete unintended Release Bundle V2 in Artifactory.

**To create a Release Bundle V2 Cleanup Retention policy:**

1. From the **Administrator** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, from the **Create Policy** dropdown list, click **Cleanup Policy**.

   <Image src="https://files.readme.io/fe55af4d4527418efda0401681cb1c84e280c1e7c63616d1c86b5a56b98ae225-Cleanup_select-Cleanup-Policy.png" align="center" width="80% " />

3. In the **Create New Cleanup Policy** page, select **Release Bundle V2**.

   <Image src="https://files.readme.io/9f49d7728b24d85500a257ee45cd1c4b3618a9bb6dc76a818fb0cbf1bc693a2a-Cleanup-policy_select-RB.png" align="center" width="80% " border={true} />

4. Configure the following in the **Create New Cleanup Policy** page:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        _Policy Name_
      </td>

      <td>
        Enter a unique and meaningful name for the policy.
      </td>
    </tr>

    <tr>
      <td>
        _Description_
      </td>

      <td>
        Enter information regarding why this policy was created, and details that help users understand its configuration.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Scope**

        Define which Release Bundle versions should be deleted.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Include Projects / Include All Projects_
      </td>

      <td>
        <Callout icon="📘" theme="info">
          ###

          **Note**

          This setting is applicable only at the global level for Platform Admins. It does not appear when creating a policy at the project level. When this setting is visible, it is mandatory.
        </Callout>

        Select the projects to which the policy should apply, or choose **Include All Projects** to run the policy across all projects on the platform. You can also select **Unassigned Repositories** to apply the policy to repositories not linked to any projects.
      </td>
    </tr>

    <tr>
      <td>
        _Include Release Bundles_
      </td>

      <td>
        Select one or more of the Release Bundles you want to delete.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Conditions**

        Define under what conditions the cleanup policy removes Release Bundles versions.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Release Bundle Versions Older Than_
      </td>

      <td>
        Apply the number of **days/weeks/months/years** for the older Release Bundles.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          From Version 7.119.0 onwards, days/weeks time unit is available.

          A day in this context is a 24-hour period from the moment the policy is executed. Other units are considered as follows:

          - 1 week = 7 days
          - 1 month = 30 days
          - 1 year = 365 days

          The system will convert them to appropriate time unit if the matching value is entered. For example, if you enter 7 days, the system changes it to 1 Week.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Not Promoted To Environments_
      </td>

      <td>
        Select one or more of the environments where the release bundles are not promoted.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          Select **Exclude Release Bundles that have been promoted to any environment** to exclude them from deletion.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        **Additional Settings**
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Cron Expression_
      </td>

      <td>
        A cron expression is a string comprised of five or six fields separated by spaces. Each field represents a different unit of time, which collectively defines the schedule for policy execution. The standard format is as follows:

        ```
        * * * * * *     (Seconds - Optional)
        | | | | | |
        | | | | | +---- Day of the week (0 - 6) (Sunday=0)
        | | | | +------ Month (1 - 12)
        | | | +-------- Day of the month (1 - 31)
        | | +---------- Hour (0 - 23)
        | +------------ Minute (0 - 59)
        +-------------- Second (0 - 59) (Optional)
        ```

        <Callout icon="📘" theme="info">
          ###

          **Note**

          This cron expression must follow the Quartz scheduler format as used in the CronTrigger class. It differs from the standard Unix cron format. For example, Quartz supports a sixth optional field for seconds and uses **?** for non-specific values. For more information, see <Anchor target="_blank" href="https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#:~:text=or%20mailing%20list.-,Format,-A%20cron%20expression">Quartz Cron Expression Format</Anchor>.
        </Callout>

        **Example Cron Expression**

        To illustrate how to construct a cron expression, consider the following example:

        **Expression**: `0 0 2 * * ?`

        - 0 - At second 0
        - 0 - At minute 0
        - 2 - At hour 2 (2:00 AM)
        - - - Every day of the month
        - - - Every month
        - ? - No specific value for the day of the week

        This expression schedules the policy to run every day at 2:00 AM.

        **Guidelines for Scheduling**

        - **Run Interval**: The minimum interval between policy executions is 6 hours. If you attempt to set a cron expression that results in a runtime shorter than this duration, you will encounter an error when saving the configuration.
        - **Off-Hours Scheduling**: It is recommended to tune your cron expression so that policies run during off-hours. This helps to reduce the impact on system performance during peak usage times.

        **Leaving the Cron Expression Empty**: If you leave the cron expression empty, you can only [Run Smart Archiving Policy Manually](/docs/archive#run-smart-archiving-policy-manually) manually. This means that there will be no automatic scheduling and the policy will not run unless you initiate it.
      </td>
    </tr>

    <tr>
      <td>
        _Max Run Duration_
      </td>

      <td>
        This setting limits the maximum duration the policy can run when enabled. The maximum allowed duration is 5 hours.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          The policy stops before the completion of the run if it exceeds the applied run duration. In one run, within this duration, it deletes all or part of your release bundles V2 depending on the size and number of items. If there are any pending release bundles v2 to be deleted, they are deleted incrementally in the next scheduled run and the subsequent runs.
        </Callout>
      </td>
    </tr>
  </tbody>
</Table>

5. Click **Save** to save the policy.

   The newly created cleanup policy appears in the **Policies** list and executes on the scheduled date and time.

   * [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy): This feature allows you to see which items would be deleted without actually deleting them. We recommend performing a dry run and reviewing the results before enabling a policy.
   * [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy): The policy must be enabled to run automatically according to the schedule or [Run Cleanup Policy Manually](#run-cleanup-policy-manually) manually.

### Create Cleanup Policy – Build

This topic outlines how to create a cleanup policy for builds. You create a cleanup policy to delete unintended builds in Artifactory.

Removing a build deletes the build entity, build-info, and build artifacts. To exclude build artifacts from deletion, uncheck **Delete Build Artifacts** checkbox under **Settings** (It is checked by default).

**To create a Build Cleanup Retention policy:**

1. From the **Administrator** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, from the **Create Policy** dropdown list, click **Cleanup Policy**.

   <Image src="https://files.readme.io/a041d5748ec7b45174ee1946fcf16c57f0a943a1bb34539f1f5192cf5c747345-Cleanup_select-Cleanup-Policy.png" align="center" width="80% " border={true} />

3. In the **Create New Cleanup Policy** page, select **Build**.

   <Image src="https://files.readme.io/19fa79ffb21e67fc590d543dd6449b4066ac816ea4508786df96da6eba0d51a7-Cleanup-policy_select-Build.png" align="center" width="80% " border={true} />

4. Configure the following in the **Create New Cleanup Policy** page:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        _Policy Name_
      </td>

      <td>
        Enter a unique and meaningful name for the policy.
      </td>
    </tr>

    <tr>
      <td>
        _Description_
      </td>

      <td>
        Enter information regarding why this policy was created, and details that help users understand its configuration.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Scope**

        Define what should be deleted.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Include Projects / Include All Projects_
      </td>

      <td>
        <Callout icon="📘" theme="info">
          ###

          **Note**

          This setting is applicable only at the global level for Platform Admins. It does not appear when creating a policy at the project level. When this setting is visible, it is mandatory.
        </Callout>

        Select the projects to which the policy should apply, or choose **Include All Projects** to run the policy across all projects on the platform. You can also select **Unassigned Repositories** to apply the policy to repositories not linked to any projects.
      </td>
    </tr>

    <tr>
      <td>
        _Include Build Patterns/Include All Builds_
      </td>

      <td>
        From the dropdown, select the build or choose **Include All Builds** to run the policy across all builds.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          Specify builds to include by explicit name. (or) Use wildcards at the end to match any suffix. For example, `buildxyz*` includes all builds starting with buildxyz.

          Using `*` as a wildcard at the start of the pattern isn't allowed. For example, `*buildxyz` is invalid.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        **Policy Conditions**

        Define under what conditions the policy finds builds.
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Builds older than_
      </td>

      <td>
        Specify the number of **days/weeks/months/years** for the older builds.

        - Deletes builds based on their creation date.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          A day in this context is a 24-hour period from the moment the policy is executed. Other units are considered as follows:

          - 1 week = 7 days
          - 1 month = 30 days
          - 1 year = 365 days

          The system will convert them to appropriate time unit if the matching value is entered. For example, if you enter 7 days, the system changes it to 1 Week.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        **Settings**
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        _Delete Build Artifacts_
      </td>

      <td>
        Deletes the artifacts associated with the build.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          This setting is enabled by default. Disable the checkbox to exclude build artifacts from deletion.
        </Callout>

        When determining which artifacts will be deleted with your build, the following rules apply:

        - **Artifact Resolution from Build-Info:** If the full repository path of the build artifacts exists in the build-info, the artifacts will be resolved from their original location where the build was published via the CLI.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          This behavior is available from version 7.106.1.
        </Callout>

        - **Older Builds:** If the build artifacts do not have an available full repository path, they will be resolved using their SHA and associated properties: `build.name`, `build.number`, and `build.timestamp`.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          - If the artifacts were promoted or copied to another target, they will also be deleted from those locations.
          - For certain build integration tools (for example, Jenkins) that may create inconsistent `build.timestamp` (compared to the build-info's `started` field), the deletion process will check if the same build name and build number exist in another project.

            - If found, the artifacts will not be deleted.
            - If not found, the artifacts will be deleted based on their SHA and properties (`build.name`, `build.number`).

            Always use a recent version of JFrog CLI as your build client for optimal results. For more information and to download the latest version, see <Anchor target="_blank" href="/integrations/docs/jfrog-cli">CLI Documentation</Anchor> and [Build Integration](/integrations/docs/build-integration).
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Cron Expression_
      </td>

      <td>
        A cron expression is a string comprised of five or six fields separated by spaces. Each field represents a different unit of time, which collectively define the schedule for policy execution. The standard format is as follows:

        ```
        * * * * * *     (Seconds - Optional)
        | | | | | |
        | | | | | +---- Day of the week (0 - 6) (Sunday=0)
        | | | | +------ Month (1 - 12)
        | | | +-------- Day of the month (1 - 31)
        | | +---------- Hour (0 - 23)
        | +------------ Minute (0 - 59)
        +-------------- Second (0 - 59) (Optional)
        ```

        <Callout icon="📘" theme="info">
          ###

          **Note**

          This cron expression must follow the Quartz scheduler format as used in the CronTrigger class. It differs from the standard Unix cron format. For example, Quartz supports a sixth optional field for seconds and uses **?** for non-specific values. For more information, see <Anchor target="_blank" href="https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#:~:text=or%20mailing%20list.-,Format,-A%20cron%20expression">Quartz Cron Expression Format</Anchor>.
        </Callout>

        **Example Cron Expression**

        To illustrate how to construct a cron expression, consider the following example:

        **Expression**: `0 0 2 * * ?`

        - 0 - At second 0
        - 0 - At minute 0
        - 2 - At hour 2 (2:00 AM)
        - - - Every day of the month
        - - - Every month
        - ? - No specific value for the day of the week

        This expression schedules the policy to run every day at 2:00 AM.

        **Guidelines for Scheduling**

        - **Run Interval**: The minimum interval between policy executions is 6 hours. If you attempt to set a cron expression that results in a runtime shorter than this duration, you will encounter an error when saving the configuration.
        - **Off-Hours Scheduling**: It is recommended to tune your cron expression so that policies run during off-hours. This helps to reduce the impact on system performance during peak usage times.

        **Leaving the Cron Expression Empty**: If you leave the cron expression empty, you can only [Run Smart Archiving Policy Manually](/docs/archive#run-smart-archiving-policy-manually) manually. This means that there will be no automatic scheduling and the policy will not run unless you initiate it.
      </td>
    </tr>

    <tr>
      <td>
        _Max Run Duration_
      </td>

      <td>
        This setting limits the maximum duration the policy can run when enabled. The maximum allowed duration is 5 hours.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          The policy stops before the completion of the run if it exceeds the applied run duration. In one run, within this duration, it deletes all or part of your builds depending on the size and number of items. If there are any pending builds to be deleted, they are deleted incrementally in the next scheduled run and the subsequent runs.
        </Callout>
      </td>
    </tr>

    <tr>
      <td>
        _Skip Trash Can_
      </td>

      <td>
        When enabled, this setting will cause builds to be permanently deleted from Artifactory instance without an option to restore them immediately after the cleanup policy is executed, bypassing the Trash Can repository.

        <Callout icon="📘" theme="info">
          ###

          **Note**

          If you want deleted items to be transferred to the trash can, you must enable the global Trash Can setting. For more information, see [Trash Can Settings](/installation/docs/general-settings#trash-can-settings).
        </Callout>
      </td>
    </tr>
  </tbody>
</Table>

5. Click **Save** to save the policy.

   The newly created cleanup policy appears in the **Policies** list and executes on the scheduled date and time.

   * [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy): This feature allows you to see which items would be deleted without actually deleting them. We recommend performing a dry run and reviewing the results before enabling a policy.
   * [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy): The policy must be enabled to run automatically according to the schedule or [Run Cleanup Policy Manually](#run-cleanup-policy-manually) manually.

### What Happens after the Cleanup Policy is Created?

This topic outlines what happens after a cleanup policy is created.

**After the Cleanup policy has been defined and created:**

* Enabled cleanup policies execute on the scheduled date and time.

  The cleanup policy can also be manually executed. For more information, see [Run Cleanup Policy Manually](#run-cleanup-policy-manually).

<Callout icon="📘" theme="info">
  ###

  **Note**

  We recommend not to run more than 10 policies at the same time.

  The Cleanup policy does not execute when an ongoing mandatory task is in progress (for example, Garbage Collection). If you want to manually [Run Cleanup Policy Manually](#run-cleanup-policy-manually) or [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy), try at a later time.
</Callout>

* The system deleted the items, along with the associated metadata.
* As the cleanup process progresses, [View All Cleanup Runs](#view-all-cleanup-runs).

### Manage Cleanup - Policies

This section outlines the actions you can perform on the Cleanup Policies in Artifactory. It includes enable/disable, search, manual run, dry run, edit, stop, delete, view and delete policies.

The following table lists all the possible actions on the policies and their equivalent links to REST API.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Task
      </th>

      <th>
        Description
      </th>

      <th>
        For UI, see...
      </th>

      <th>
        For API, see...
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **View All Policies**
      </td>

      <td>
        This section outlines how to view all cleanup policies. It guides you in reviewing key details such as the policy status, associated projects with the policy, timestamps for the last and next scheduled runs, last run status, actions performed on each policy, and options for customizing table columns.
      </td>

      <td>
        [View All Cleanup Policies](#view-all-cleanup-policies)
      </td>

      <td>
        - [Get all Package Cleanup Policies API](/administration/reference/getallpackagecleanuppolicies)
        - [Get All Cleanup Bundle Policies API](/administration/reference/getallreleasebundlecleanuppolicies)
      </td>
    </tr>

    <tr>
      <td>
        **Perform a Dry Run**
      </td>

      <td>
        This section outlines how to perform a dry run for a cleanup policy. A dry run lets you preview which items will be deleted based on your defined policy criteria, without performing the actual deleting. This helps you understand the potential outcome before executing the policy. After the dry run, a **CSV** report is generated, listing all items that would be deleted along with relevant details. Review this list to decide whether to proceed with the policy or adjust the settings.
      </td>

      <td>
        [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy)
      </td>

      <td>
        - [Manually Run Package Cleanup Policy API](/administration/reference/runpackagecleanuppolicy)
        - [Manually Run Release Bundle Cleanup Policy API](https://docs.jfrog.com/administration/reference/runreleasebundlecleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Download the Last Run Report**
      </td>

      <td>
        This section outlines how to download the last run report. The report is in CSV format and lists all deleted items with relevant information. You can review the list to learn about the deleted items.
      </td>

      <td>
        [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy)
      </td>

      <td>
        [Download Cleanup Policy Run Report](/administration/reference/downloadcleanuppolicyrunreport)
      </td>
    </tr>

    <tr>
      <td>
        **Enable/Disable Policy**
      </td>

      <td>
        This topic outlines how to enable/disable a cleanup policy. By default, newly created cleanup policies are disabled. You must activate a policy before it can execute automatically according to the schedule or be triggered manually.
      </td>

      <td>
        [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy)
      </td>

      <td>
        - [Enable/Disable a Package Cleanup Policy API](https://docs.jfrog.com/administration/reference/enabledisablepackagecleanuppolicy)
        - [Enable/Disable Release Bundle Cleanup Policy API](https://docs.jfrog.com/administration/reference/enabledisablereleasebundlecleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Run Now**
      </td>

      <td>
        This topic outlines how to run a cleanup policy manually. In addition to the periodic automated execution of the cleanup policy that occurs if you enable the policy and set its Cron Expression, you can also manually run the cleanup policy at any time.
      </td>

      <td>
        [Run Cleanup Policy Manually](#run-cleanup-policy-manually)
      </td>

      <td>
        - [Manually Run Package Cleanup Policy API](https://docs.jfrog.com/administration/reference/runpackagecleanuppolicy)
        - [Manually Run Release Bundle Cleanup Policy API](https://docs.jfrog.com/administration/reference/runreleasebundlecleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Search Policies**
      </td>

      <td>
        This topic outlines how to search for cleanup policies to locate the desired policy easily.
      </td>

      <td>
        [Search Cleanup Policy](#search-cleanup-policy)
      </td>

      <td>
        - [Get Single Package Cleanup Policy by Key API](https://docs.jfrog.com/administration/reference/getpackagecleanuppolicy)
        - [Get Single Release Bundle Cleanup Policy by Key API](https://docs.jfrog.com/administration/reference/getreleasebundlecleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Disable All Policies**
      </td>

      <td>
        This topic outlines how to disable all cleanup policies. As a Platform Admin, you can disable all policies globally, making them inactive. Once this is done, you can activate policies individually as needed.
      </td>

      <td>
        [Disable All Cleanup Policies](#disable-all-cleanup-policies)
      </td>

      <td>
        [Disable All Cleanup Policies API](https://docs.jfrog.com/administration/reference/disableallcleanuppolicies)
      </td>
    </tr>

    <tr>
      <td>
        **Edit Policy**
      </td>

      <td>
        This topic outlines how to edit a Cleanup policy. After the cleanup policy has been created, you can change the settings or cleanup criteria.
      </td>

      <td>
        [Edit Cleanup Policy](#edit-cleanup-policy)
      </td>

      <td>
        - [Update a Package-Level Cleanup Policy API](https://docs.jfrog.com/administration/reference/updatepackagecleanuppolicy)
        - [Stop a Running Cleanup Policy API](https://docs.jfrog.com/administration/reference/stoprunningcleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Stop Policy**
      </td>

      <td>
        This topic outlines how to stop a running cleanup policy. For some reason, you may want to stop a running cleanup policy that is currently running before it finishes completion.
      </td>

      <td>
        [Stop a Running Cleanup Policy](#stop-a-running-cleanup-policy)
      </td>

      <td>
        [Stop a Running Cleanup Policy API](https://docs.jfrog.com/administration/reference/stoprunningcleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Delete Policy**
      </td>

      <td>
        This topic outlines how to delete a Cleanup policy. If you decide that a cleanup policy is no longer needed, you can delete it.
      </td>

      <td>
        [Delete Cleanup Policy](#delete-cleanup-policy)
      </td>

      <td>
        - [Delete Package Cleanup Policy API](https://docs.jfrog.com/administration/reference/deletepackagecleanuppolicy)
        - [Delete Release Bundle Cleanup Policy API](https://docs.jfrog.com/administration/reference/deletereleasebundlecleanuppolicy)
      </td>
    </tr>

    <tr>
      <td>
        **Stop All Runs**
      </td>

      <td>
        This topic outlines how to stop all cleanup policy runs. You can perform this action from the policies tab and runs tab. As a Platform Admin, you can stop all currently running policies. Once a policy run is stopped, it cannot resume from its last point. You must restart the policy from the beginning to rerun it.
      </td>

      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        [Stop All Running Cleanup Policies API](/administration/reference/stopallrunningcleanuppolicies)
      </td>
    </tr>
  </tbody>
</Table>

#### Authorization

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin

        **Note:** Applicable within the scope of your project context.
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [Edit Cleanup Policy](#edit-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Run Cleanup Policy Manually](#run-cleanup-policy-manually)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Edit Cleanup Policy](#edit-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop a Running Cleanup Policy](#stop-a-running-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Delete Cleanup Policy](#delete-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Disable All Cleanup Policies](#disable-all-cleanup-policies)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note:** This option is shown from the Global Context only.
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Search Cleanup Policy](#search-cleanup-policy)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)

        **Note:** This option is shown from the Global Context only.
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

#### View All Cleanup Policies

This section outlines how to view all cleanup policies. It guides you in reviewing key details such as the policy status, associated projects with the policy, timestamps for the last and next scheduled runs, last run status, actions performed on each policy, and options for customizing table columns.

**To view all the Cleanup policies:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. Under the **Policies** tab, you can view all the policies.

#### Cleanup Policy Table Fields

The following table describes the columns of the cleanup policy table fields.

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Policy Name**
      </td>

      <td>
        Indicates the name of the policy.
      </td>
    </tr>

    <tr>
      <td>
        **Object Type**
      </td>

      <td>
        Indicated the type of object. It can be Packages or Release Bundles.
      </td>
    </tr>

    <tr>
      <td>
        **Global**
      </td>

      <td>
        Indicates whether it is a global policy.

        Global Policy may affect multiple projects. It can be managed by a Platform Admin on the Global Scope only.
      </td>
    </tr>

    <tr>
      <td>
        **Project**
      </td>

      <td>
        Indicates the name of the project.

        **Note**: **Unassigned Repos**: Only repositories not assigned to a project will be affected.
      </td>
    </tr>

    <tr>
      <td>
        **Last Run Status**
      </td>

      <td>
        Indicates the status of each policy execution, which can be one of the following:<ul>
          <li>
            <img src="https://files.readme.io/3372729f3def2e0d12e645732bcd6a79dbe43cc0e36388674e82d64da8c36e38-uuid-3ba9a3eb-b778-8a43-85dc-6fe9663c1ac3.png" width="20" height="20" />

            <strong>Completed (dry run):</strong> The policy has been executed successfully, with no errors.
          </li>

          <li>
            <img src="https://files.readme.io/3372729f3def2e0d12e645732bcd6a79dbe43cc0e36388674e82d64da8c36e38-uuid-3ba9a3eb-b778-8a43-85dc-6fe9663c1ac3.png" width="20" height="20" />

            <strong>Completed:</strong> The policy has been executed successfully, with no errors.
          </li>

          <li>
            <img src="https://files.readme.io/e2fa767279354067007b8146cb64189e9ee5dd895279e3b728bb3a8da343a7d5-uuid-0ad80f13-bb77-55c1-bcd4-da615b12c40c.png" width="20" height="20" />

            <strong>Completed with Errors:</strong> The policy execution has been completed, but there were some errors. Check the logs for details.
          </li>

          <li>
            <img src="https://files.readme.io/21179307f268b92ef06682664facbbac29fe69ccb5a8db9dcf4bfbc6ac505d86-uuid-ce9913ec-c429-475d-68ac-833a2f186f44.png" width="20" height="20" />

            <strong>Completed with Errors (dry run):</strong> The policy has been executed with errors.
          </li>

          <li>
            <img src="https://files.readme.io/ab8faa880ddfc9670c6214bd9e802f6e62c46d324cdf899f7ecef64a9a219795-uuid-c987435c-2edb-406e-f32c-408adbae1faf.png" width="20" height="20" />

            <strong>In Progress:</strong> The policy execution is in progress and there are no errors.
          </li>

          <li>
            <img src="https://files.readme.io/21179307f268b92ef06682664facbbac29fe69ccb5a8db9dcf4bfbc6ac505d86-uuid-ce9913ec-c429-475d-68ac-833a2f186f44.png" width="20" height="20" />

            <strong>In Progress with Errors:</strong> The policy execution is in progress and there are errors.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Stopping:</strong> The user has manually stopped the policy execution, and it is currently being stopped.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Stopped:</strong> The user manually stopped the policy execution.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Failed:</strong> The policy execution has failed.
          </li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>
        **Last Run**
      </td>

      <td>
        Indicates when the last run was executed.
      </td>
    </tr>

    <tr>
      <td>
        **Next Run**
      </td>

      <td>
        Indicates the next scheduled run.
      </td>
    </tr>

    <tr>
      <td>
        **Enabled**
      </td>

      <td>
        Indicates whether the policy is enabled or disabled:<ul>
          <li>
            <strong>Enabled:</strong> Indicates the policy has been enabled. You can run the policy manually or it runs according to the defined schedule.
          </li>

          <li>
            <strong>Disabled:</strong> Indicates the policy has been disabled. You can perform dry run but not manual or scheduled runs.
          </li>
        </ul>
      </td>
    </tr>
  </tbody>
</Table>

#### More Actions

From the more icon you can perform various actions on the policies. The actions are as follows:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Icon
      </th>

      <th>
        Action
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        ![](https://files.readme.io/2c05a85ba3c92ee6a403868f216f88949794f09b154e0b8c0c78e05c131a5aab-uuid-ecffc3d7-ca49-e2ff-32fa-2cd696c55d1b.png)
      </td>

      <td>
        Run Now
      </td>

      <td>
        Manually run the enabled policy.
      </td>
    </tr>

    <tr>
      <td>
        ![](https://files.readme.io/c1f2992423c0b50f73301abb89a052eba1625123a3481ae119c5df679b5d2651-uuid-9c01e754-c599-8986-2ec4-5c537ca41729.png)
      </td>

      <td>
        Perform a Dry Run
      </td>

      <td>
        Review which packages will be deleted on the actual run.
      </td>
    </tr>

    <tr>
      <td>
        ![](https://files.readme.io/3468bb2f1940601100417c412dd737103f4fb8834c64f389f7dc5df5ec2db68a-uuid-ed99a587-721b-7195-4fb7-b1c645dbd50d.png)
      </td>

      <td>
        Edit
      </td>

      <td>
        Edit the policy to make necessary changes
      </td>
    </tr>

    <tr>
      <td>
        ![](https://files.readme.io/f8f4f184feacc691e461df80b0d347b784d66324db896ae3809454b88abf252a-uuid-e48af012-1f80-9b98-b356-d8030377828c.png)
      </td>

      <td>
        Stop
      </td>

      <td>
        Stop a running policy
      </td>
    </tr>

    <tr>
      <td>
        ![](https://files.readme.io/e7b0a9e302035cd3c443f46f6c6b4ca24e204657620b8dc16ed8136f77d0d347-uuid-d0ed5c69-8a34-4680-15fc-320ac939b965.png)
      </td>

      <td>
        Download Last Report
      </td>

      <td>
        On completing the run, download the last run report based on the **Last Run Status** to review:

        - **For Actual Run**

          What packages were deleted for the actual run.
        - **For Dry Run**

          What packages will be deleted on the actual run.
      </td>
    </tr>

    <tr>
      <td>
        ![](https://files.readme.io/762fb688a19f9417f006d9fff0c30ee38448c94c96f45e6ac5cb5bbbd825789e-uuid-57793160-3e00-786c-2fa7-7b07f99fedd0.png)
      </td>

      <td>
        Delete
      </td>

      <td>
        Delete the policy from the system.
      </td>
    </tr>
  </tbody>
</Table>

#### Customize Table Columns

Arrange the table columns according to how you want to view them.

**To display and arrange the columns:**

1. From the Table header, click the **Customize Columns** at the end.
2. Select which columns to display in the Customize Columns pop-up and drag and drop to reorder them.
3. Click **Apply**.

   <Image src="https://files.readme.io/211ea7cf2579c2ec71938ee573e7dfeabc8bbcee5f97d48f29a9c357fc1cf81b-Cleanup-policies_customize-columns.png" align="center" width="70% " border={true} />

#### Refresh Policies

To refresh policies, click the **Refresh** icon in the top-right corner of the table header.

<Image src="https://files.readme.io/fecc098fdcad1bb982fe89070b0f6d0ea2e606da01409a5623fc12e4f21ebbd6-Cleanup-policies_refresh-table.png" align="center" width="70% " border={true} />

#### Search Cleanup Policy

This topic outlines how to search for cleanup policies to locate the desired policy easily.

**To search the Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. Click the **Policies** tab, enter the policy name in the **Search** field, and then press enter on the keyboard.

#### Perform Dry Run Cleanup Policy

This section outlines how to perform a dry run for a cleanup policy. A dry run lets you preview which items will be deleted based on your defined policy criteria, without performing the actual deleting. This helps you understand the potential outcome before executing the policy. After the dry run, a **CSV** report is generated, listing all items that would be deleted along with relevant details. Review this list to decide whether to proceed with the policy or adjust the settings.

<Callout icon="📘" theme="info">
  ###

  **Note**

  - We recommend performing a dry run and reviewing the results before activating a policy to prevent unintended deletion.
  - Dry run results reflect the specific point in time when the dry run is performed. The results of an actual policy execution may differ, as it occurs at a later scheduled time.
</Callout>

**To perform a dry run for the Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to run, click the **•••** icon and then click **Dry Run**.

   <Image src="https://files.readme.io/f06c969906e6574be2072ab3f13fbf003f3c27d5ab130dc488607dc639b0a554-Cleanup-policies_dry-run.png" align="center" width="70% " border={true} />

4. After the dry run is completed:

   1. Download the report from [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy) or [Download and Review Cleanup Run Report](#download-and-review-cleanup-run-report).
   2. Review its status report, as explained in [Cleanup Run Report Overview](#cleanup-run-report-overview).

#### Enable/Disable Cleanup Policy

This topic outlines how to enable/disable a cleanup policy. By default, newly created cleanup policies are disabled. You must activate a policy before it can execute automatically according to the schedule or be triggered manually.

<Callout icon="📘" theme="info">
  ###

  **Note**

  We recommend that you first perform a dry run and review its results before you enable a policy. This helps prevent unintended deletion. For more information, see [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy).
</Callout>

**The following actions can be performed on a disabled policy:**

* [Perform Dry Run Cleanup Policy](#perform-dry-run-cleanup-policy)
* [Edit Cleanup Policy](#edit-cleanup-policy)
* [Delete Cleanup Policy](#delete-cleanup-policy)

**To Enable or Disable the Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to enable/disable, and then toggle the slider ![](https://files.readme.io/9cf28ef5fb15160e43c1c4ebcbc5f41b96b2c2e1cbf989d0cad07fd5543a83c0-uuid-d1593ad6-79de-8546-7db6-75f4fbf31cd3.png) under the **Active** column.

   Once enabled, the policy will run automatically based on the schedule you set during creation. You can also run it manually, as detailed in the [Run Cleanup Policy Manually](#run-cleanup-policy-manually).

#### Disable All Cleanup Policies

This topic outlines how to disable all cleanup policies. As a Platform Admin, you can disable all policies globally, making them inactive. Once this is done, you can activate policies individually as needed.

<Callout icon="📘" theme="info">
  ###

  **Note**

  The option to disable all policies is not available to Project Admins.
</Callout>

**To disable all the Cleanup policies:**

Depending on your role, you can work with the following contexts:

* **Global Context**

<Callout icon="📘" theme="info">
  ###

  **Note**

  Applies to Platform Admin only.
</Callout>

1. From the **Projects** dropdown list, click **All Projects**.

<Callout icon="📘" theme="info">
  ###

  **Note**

  The **Disable All Policies** option can be viewed in the global context only.
</Callout>

2. From the **Administrator** module, click **Artifactory Settings**, and then click **Retention Policies**.

   The **Retention Policies** page appears.

3. In the **Retention Policies** page, click **Cleanup**.

   <Image src="https://files.readme.io/1ee002a1d30e65c4f75ba54d0d4724de178d7f831cf8461abc1dc8485708e211-Cleanup-policy_global-stop-disable.png" align="center" width="80% " border={true} />

4. From the **Policies** tab, click **Global Stop/Disable** dropdown list, and then click **Disable All Policies**.

   <Image src="https://files.readme.io/c5244b2d9ebdbf0c58438c75fba8c88e18bb560b85e3aef9b4fa614a6df9eb23-Cleanup-policy_disable-all-policies-option.png" align="center" width="40% " border={true} />

   The **Disable All Policies** dialog appears.

5. In the **Disable All Policies** dialog, click **Disable All Policies** to confirm.

6. Check the **Active** column in the policies list to verify that all policies are now disabled.

#### Run Cleanup Policy Manually

This topic outlines how to run a cleanup policy manually. In addition to the periodic automated execution of the cleanup policy that occurs if you enable the policy and set its Cron Expression, you can also manually run the cleanup policy at any time.

<Callout icon="📘" theme="info">
  ###

  **Note**

  To manually run a cleanup policy, the policy must first be activated. For more information, see [Enable/Disable Cleanup Policy](#enabledisable-cleanup-policy).
</Callout>

**To run the Cleanup policy manually:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to run, click **•••** icon and then click **Run**.

4. After the run is completed:

   1. Download the completed report from [Download Last Run Report Cleanup Policy](#download-last-run-report-cleanup-policy) or [Download and Review Cleanup Run Report](#download-and-review-cleanup-run-report).
   2. Review downloaded report. For more information, see [Cleanup Run Report Overview](#cleanup-run-report-overview).

#### Download Last Run Report Cleanup Policy

This section outlines how to download the last run report. The report is in CSV format and lists all deleted items with relevant information. You can review the list to learn about the deleted items.

**To download the report:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy for which you want to download the report, click **•••** icon, and then click **Download Last Report**.

   A zip file is downloaded including one **.csv** file.

4. Review the downloaded report. For more information, see [Cleanup Run Report Overview](#cleanup-run-report-overview).

#### Stop a Running Cleanup Policy

This topic outlines how to stop a running cleanup policy. For some reason, you may want to stop a running cleanup policy that is currently running before it finishes completion.

<Callout icon="📘" theme="info">
  ###

  **Note**

  Once a policy has been stopped, it cannot resume from the point where it stopped. The only way to run the policy again is to restart it from the beginning.
</Callout>

**To stop the running Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to stop, click **•••** icon and then click  **Stop**.

4. In the **Status** column of **Runs** tab, the status changes to **Stopped** for that run.

#### Stop All Cleanup Policy Runs

Platform Admins can stop all currently running policies from both the Policies tab and the Runs tab. Once a policy run is stopped, it cannot resume from its last point. You must restart the policy from the beginning to rerun it.

<Callout icon="📘" theme="info">
  ###

  **Note**

  The option to stop all running policies is not available to Project Admins. The **Stop All Runs** option can be viewed in the global context only.
</Callout>

**To stop all Cleanup policy runs:**

1. From the **Administrator** module, select **Artifactory Settings > Retention Policies**.

2. The **Retention Policies** page appears.

3. In the **Retention Policies** page, click **Cleanup**.

   <Image src="https://files.readme.io/f90915c1980b47ab4907352ca19317962f9fc0425da7a13802596d2cbdd6960d-Cleanup-policy_global-stop-disable.png" align="center" width="80% " border={true} />

4. From the **Policies** tab, click **Global Stop/Disable**, and then click **Stop All Runs**.

   <Image src="https://files.readme.io/f12688e353ac80fa9c9ecfeb2a2e5a469917df305446b040cffea281c98e0ffc-Cleanup-policy_stop-all-runs-option.png" align="center" width="40% " border={true} />

   **Stop All Runs** dialog appears.

5. In the **Stop All Runs** dialog, click **Stop All Runs** to confirm.

   To verify that all runs have stopped, under the **Policies** tab, check the **Last Run Status** column to ensure that all runs have stopped.

#### Edit Cleanup Policy

This topic outlines how to edit a Cleanup policy. After the cleanup policy has been created, you can change the settings or cleanup criteria.

<Callout icon="📘" theme="info">
  ###

  **Note**

  You cannot update a running policy. If you want to update a policy that is running, you need to either wait for the run to complete or [Stop a Running Cleanup Policy](#stop-a-running-cleanup-policy).
</Callout>

**To edit the Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to edit, click **•••** icon and then click **Edit**.

   Edit `<Policy Name>`**&#x20;Cleanup Policy** page appears.

4. In the `<Policy Name>`**&#x20;Cleanup Policy** page, update the settings as needed, and then click **Save**.

   If the package cleanup policy includes a local repository configured for remote push replication, deletions will be replicated to the remote targets.

#### Delete Cleanup Policy

If you decide that a cleanup policy is no longer needed, you can delete it.

<Callout icon="📘" theme="info">
  ###

  **Note**

  You cannot delete a running policy. If you want to delete a running policy, you need to either wait for the run to complete or [Stop a Running Cleanup Policy](#stop-a-running-cleanup-policy).
</Callout>

**To delete the Cleanup policy:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Policies** tab, under **Policies**, locate the policy you want to delete, click **•••** icon and then click **Delete**.

   The **Delete Policy** dialog appears.

4. In the **Delete Policy** dialog, click **Delete** to confirm.

   The policy is deleted and removed from the **Policies** list.

### Manage Cleanup - Runs

This section outlines the actions you can perform on the Cleanup Runs in the Artifactory. It includes view, stop all runs and downloading run reports.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Task
      </th>

      <th>
        Description
      </th>

      <th>
        For UI, see...
      </th>

      <th>
        For API, see...
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **View All Cleanup Runs**
      </td>

      <td>
        This section outlines how to view the status of both past and ongoing cleanup runs. It provides guidance on how to review specific details, including the items that have been deleted, the associated timestamps, the status of each cleanup operation, customizing table columns, and applying filters to view the desired information.
      </td>

      <td>
        [View All Cleanup Runs](#view-all-cleanup-runs)
      </td>

      <td>
        NA
      </td>
    </tr>

    <tr>
      <td>
        **Stop All Cleanup Policy Runs**
      </td>

      <td>
        This topic outlines how to stop all cleanup policy runs. You can stop all currently running policies. Once a policy run is stopped, it cannot resume from its last point. You must restart the policy from the beginning to rerun it.
      </td>

      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        [Stop All Running Cleanup Policies API](/administration/reference/stopallrunningcleanuppolicies)
      </td>
    </tr>

    <tr>
      <td>
        **Download and Review Cleanup Run Report**
      </td>

      <td>
        This section outlines how to download a cleanup run report. The report is in CSV format and lists all deleted items with relevant information. You can review the list to learn about the deleted items.
      </td>

      <td>
        [Download and Review Cleanup Run Report](#download-and-review-cleanup-run-report)

        [Cleanup Run Report Overview](#cleanup-run-report-overview)
      </td>

      <td>
        [Download Cleanup Policy Run Report](/administration/reference/downloadcleanuppolicyrunreport)
      </td>
    </tr>
  </tbody>
</Table>

#### Authorization

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Activity
      </th>

      <th>
        Platform Admin
      </th>

      <th>
        Project Admin

        **Note:** Applicable within the scope of your project context.
      </th>

      <th>
        Non-admin User
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [View All Cleanup Runs](#view-all-cleanup-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Stop All Cleanup Policy Runs](#stop-all-cleanup-policy-runs)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>

    <tr>
      <td>
        [Download and Review Cleanup Run Report](#download-and-review-cleanup-run-report)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/a8f4274ba5c80754eaca971fc6199c2bb99b70dff7925bf5ec9a0b510a677878-uuid-ea92c1e1-5d79-3981-c8d5-5a5d13efa637.svg)
      </td>

      <td>
        ![](https://files.readme.io/d67e7b288a5601216dbb40ab808a8be8decaf1a50ba49888b623eba23783bbb0-uuid-558c7cd2-b4b5-9b18-93a6-68ac49d53c0f.svg)
      </td>
    </tr>
  </tbody>
</Table>

#### View All Cleanup Runs

This section outlines how to view the status of both past and ongoing cleanup runs. It provides guidance on how to review specific details, including the items that have been deleted, the associated timestamps, the status of each cleanup operation, customizing table columns, and applying filters to view the desired information.

**To view the Cleanup policy runs:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Runs** tab, under **Runs**, locate the **Run Id** you want to learn about it.

   In this list, you can review a comprehensive history of executed cleanup policies, including the start time, number and physical size of deleted items, and run status. The list is sorted chronologically, with the most recent run at the top. For more information, see the following table for run statuses.

4. To view a report on a specific policy run, locate the run, and then click **Report** icon.

   A zip file will be downloaded containing one or more **.csv** files. If the report is for a dry run, it will show the items that would be deleted in a real run. If it’s for an actual cleanup run, it will detail what was deleted.

<Callout icon="📘" theme="info">
  ###

  **Note**

  - Reports are created and stored in a dedicated repository called `jfrog-policy-reports-local`. We recommend not deleting this repository to maintain a history of policy executions and their results. Deleting it will result in the loss of this history.
  - If no items are deleted (for a real run) or deleted (for a dry run), a report will not be generated.
  - The number of previous runs included in the history is defined by the artifactory.policy.cleanup.nodes_cleaned.expiration.days system property. For more information, see [Cleanup Policies System Properties](#cleanup-policies-system-properties).
</Callout>

#### Cleanup Runs Table Fields

The following table describes the columns of the cleanup runs table fields.

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Run ID**
      </td>

      <td>
        Indicates the number of the run id.
      </td>
    </tr>

    <tr>
      <td>
        **Global**
      </td>

      <td>
        Indicates the policy is applicable at the global level.

        **Note**

        Global Policy may affect multiple projects. It can be managed by a Platform Admin on the Global Scope only.
      </td>
    </tr>

    <tr>
      <td>
        **Project**
      </td>

      <td>
        Indicates the name of the project.
      </td>
    </tr>

    <tr>
      <td>
        **Object Type**
      </td>

      <td>
        Indicated the type of object. It can be Packages or Release Bundles.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Name**
      </td>

      <td>
        Indicates the name of the policy.
      </td>
    </tr>

    <tr>
      <td>
        **Start Time**
      </td>

      <td>
        Indicates the date and time when the cleanup operation started running.
      </td>
    </tr>

    <tr>
      <td>
        **Cleaned Items (Physical Size)**
      </td>

      <td>
        The number of total deleted items, and the total items (The deleted size).
      </td>
    </tr>

    <tr>
      <td>
        **Status**
      </td>

      <td>
        Indicates the status of each policy execution, which can be one of the following:<ul>
          <li>
            <img src="https://files.readme.io/3372729f3def2e0d12e645732bcd6a79dbe43cc0e36388674e82d64da8c36e38-uuid-3ba9a3eb-b778-8a43-85dc-6fe9663c1ac3.png" width="20" height="20" />

            <strong>Completed (dry run):</strong> The policy has been executed successfully, with no errors.
          </li>

          <li>
            <img src="https://files.readme.io/3372729f3def2e0d12e645732bcd6a79dbe43cc0e36388674e82d64da8c36e38-uuid-3ba9a3eb-b778-8a43-85dc-6fe9663c1ac3.png" width="20" height="20" />

            <strong>Completed:</strong> The policy has been executed successfully, with no errors.
          </li>

          <li>
            <img src="https://files.readme.io/e2fa767279354067007b8146cb64189e9ee5dd895279e3b728bb3a8da343a7d5-uuid-0ad80f13-bb77-55c1-bcd4-da615b12c40c.png" width="20" height="20" />

            <strong>Completed with Errors:</strong> The policy execution has been completed, but there were some errors. Check the logs for details.
          </li>

          <li>
            <img src="https://files.readme.io/21179307f268b92ef06682664facbbac29fe69ccb5a8db9dcf4bfbc6ac505d86-uuid-ce9913ec-c429-475d-68ac-833a2f186f44.png" width="20" height="20" />

            <strong>Completed with Errors (dry run):</strong> The policy has been executed with errors.
          </li>

          <li>
            <img src="https://files.readme.io/ab8faa880ddfc9670c6214bd9e802f6e62c46d324cdf899f7ecef64a9a219795-uuid-c987435c-2edb-406e-f32c-408adbae1faf.png" width="20" height="20" />

            <strong>In Progress:</strong> The policy execution is in progress and there are no errors.
          </li>

          <li>
            <img src="https://files.readme.io/21179307f268b92ef06682664facbbac29fe69ccb5a8db9dcf4bfbc6ac505d86-uuid-ce9913ec-c429-475d-68ac-833a2f186f44.png" width="20" height="20" />

            <strong>In Progress with Errors:</strong> The policy execution is in progress and there are errors.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Stopping:</strong> The user has manually stopped the policy execution, and it is currently being stopped.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Stopped:</strong> The user manually stopped the policy execution.
          </li>

          <li>
            <img src="https://files.readme.io/9700730f8be18f6335d04f1ae03c007525160600080f73e9dfbca3927a93f8f6-uuid-6db49b25-f9ce-4db1-fb97-780e9e8a094c.png" width="20" height="20" />

            <strong>Failed:</strong> The policy execution has failed.
          </li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>
        **Report**
      </td>

      <td>
        Indicates the report download state as follows:<ul>
          <li>
            <strong>Enabled:</strong> Indicates the report is available for download.
          </li>

          <li>
            <strong>Selected:</strong> Indicates the download icon is clicked.
          </li>

          <li>
            <strong>Disabled:</strong> Indicates the report is not available.
          </li>
        </ul>
      </td>
    </tr>
  </tbody>
</Table>

#### Customize Table Columns

Arrange the table columns according to how you want to view them.

**To display and arrange the columns:**

1. From the Table header, click **Customize Columns** icon at the end.
2. Select which columns to display in the Customize Columns pop-up and drag and drop to reorder them.
3. Click **Apply**.

   <Image src="https://files.readme.io/8b36c5ba016353a9016cfcf70e95fad9c924d91579c64e9b691bc38d3c9fa0e2-Cleanup-policies_customize-columns_Runs.png" align="center" width="70% " border={true} />

#### Apply Filters to Sort Run Results

You can apply the filter to the run results to easily access your desired view.

**To apply filters:**

1. Click the **Filter** icon in the top-right corner of the table header.

2. Apply the following fields as you want to sort:

| Name            | Description                                                                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Policy Name** | Enter the name of the policy and choose the policy from the list.                                                                                                                            |
| **Project**     | Enter the name of the project and choose the project from the list.                                                                                                                          |
| **Start Time**  | Select from the dropdown list or customize the time range using the calendar.                                                                                                                |
| **Status**      | Select the run status from the available list. For more information on statuses, see [Cleanup Runs Table Fields](/docs/cleanup-policies#cleanup-runs-table-fields) and the **Status** field. |
| **Other**       | Select the available options as applicable.                                                                                                                                                  |

3. To remove applied filters, click **Clear all**.

   <Image src="https://files.readme.io/c1b5b12780af8382c98a793ea1d2ad9b008d4a147801dbd56cd79f8194447386-Cleanup-policy_clear-all-filters.png" align="center" width="70% " border={true} />

#### Refresh Cleanup Runs

If you don't see the latest created runs in the list, you can refresh the runs to view them.

To refresh runs, click the **Refresh** icon in the top-right corner of the table header.

<Image src="https://files.readme.io/8e3e02b6434b52052a56ad3160c9163d5bbbbb3ce4d03fe156733e518b0c22a5-Cleanup-policy_refresh-table-Runs.png" align="center" width="70% " border={true} />

#### Stop All Cleanup Policy Runs

This topic outlines how to stop all cleanup policy runs. You can perform this action from the policies tab and runs tab. As a Platform Admin, you can stop all currently running policies. Once a policy run is stopped, it cannot resume from its last point. You must restart the policy from the beginning to rerun it.

<Callout icon="📘" theme="info">
  ###

  **Note**

  The option to stop all running policies is not available to Project Admins. The **Stop All Runs** option can be viewed in the global context only.
</Callout>

**To stop all Cleanup policy runs:**

1. From the **Administrator** module, select **Artifactory Settings > Retention Policies**. The **Retention Policies** page appears.
2. In the **Retention Policies** page, click **Cleanup**.
3. From the **Policies** tab, click **Global Stop/Disable**, and then click **Stop All Runs**.

   The **Stop All Runs** dialog appears.
4. In the **Stop All Runs** dialog, click **Stop All Runs** to confirm.

   To verify that all runs have stopped, under the **Policies** tab, check the **Last Run Status** column to ensure that all runs have stopped.

#### Download and Review Cleanup Run Report

This section outlines how to download a cleanup run report. The report is in CSV format and lists all deleted items with relevant information. You can review the list to learn about the deleted items.

<Callout icon="📘" theme="info">
  ###

  **Note**

  The report is generated for both actual run and dry run.
</Callout>

**To download the report:**

1. From the **Administration** module, select **Artifactory > Retention Policies**.

2. In the **Retention Policies** page, click **Cleanup**.

3. From the **Runs** tab, under **Runs**, locate the run for which you want to download the report, and then click **Download** icon.

   A zip file is downloaded including one **.csv** file.

   Possible Download icon statuses are as follows:

| Icon                                                                                                                                        | State    | Description                                     |
| :------------------------------------------------------------------------------------------------------------------------------------------ | :------- | :---------------------------------------------- |
| ![](https://files.readme.io/882a30678a19872071700d0d8cfcc3dd4fbe5a90a01f638b0ec6554a10824e71-uuid-6728ae0b-8774-c6fa-2020-7c7db4531bd3.png) | Enabled  | Indicates the report is available for download. |
| ![](https://files.readme.io/537f3cb21c34c341d51e63740e18cef96f8c4b2c473b1ebbacf075ba63ee19a5-uuid-ecac4f7d-d12f-8871-83af-0fddeded681e.png) | Hover    | On hovering the mouse pointer,                  |
| ![](https://files.readme.io/c28aeed83dd0aa0d494d5b7e5859f5485c4906f6b1a62e640e39495a07de0b4f-uuid-31c9b012-21b7-0e40-3637-0c2fa131b89b.png) | Selected | Indicates the download icon is clicked.         |
| ![](https://files.readme.io/38f29758370b5387c39a47db17f90433a0c96560ed08da19c183d36a134ff2a1-uuid-bf918354-f2f6-e520-20e8-11dd25feb09f.png) | Disabled | Indicates the report is not available.          |

4. Review the downloaded report. For more information, see [Cleanup Run Report Overview](#cleanup-run-report-overview).

##### Cleanup Run Report Overview

The downloaded CSV report provides a detailed summary of the cleanup process, including information on the policy used, the status of the run, and the items processed.

* Following are the package cleanup report fields:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Run General Details**
      </td>

      <td>
        The general details of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        cleanup run for `<policy-name>` `<status>`
      </td>

      <td>
        The policy name and current status of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        isDryRun
      </td>

      <td>
        Indicates whether the run was a dry run or an actual run.

        - **True**: Dry run (no changes made).
        - **False**: Actual run (changes applied).
      </td>
    </tr>

    <tr>
      <td>
        Run Start Time
      </td>

      <td>
        The timestamp when the cleanup process started.
      </td>
    </tr>

    <tr>
      <td>
        Duration
      </td>

      <td>
        The total time taken for the cleanup process.
      </td>
    </tr>

    <tr>
      <td>
        **Run Summary**
      </td>

      <td>
        The summary of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        cleanup packages count
      </td>

      <td>
        The total number of packages successfully deleted.
      </td>
    </tr>

    <tr>
      <td>
        Total packages count
      </td>

      <td>
        The total number of packages processed during the cleanup.
      </td>
    </tr>

    <tr>
      <td>
        Packages virtual size
      </td>

      <td>
        The virtual size of all deleted packages.
      </td>
    </tr>

    <tr>
      <td>
        Packages physical size
      </td>

      <td>
        The actual physical size of all deleted packages.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Configuration For This Run**
      </td>

      <td>
        Indicates the configuration details of the policy.
      </td>
    </tr>

    <tr>
      <td>
        Policy Key
      </td>

      <td>
        The name of the cleanup policy used for this run.
      </td>
    </tr>

    <tr>
      <td>
        Description
      </td>

      <td>
        A description of the cleanup policy.
      </td>
    </tr>

    <tr>
      <td>
        Cron Expression
      </td>

      <td>
        The cron expression used to schedule the cleanup runs.
      </td>
    </tr>

    <tr>
      <td>
        Max Run Duration
      </td>

      <td>
        The maximum duration allowed for the policy to run.
      </td>
    </tr>

    <tr>
      <td>
        Skip Trash Can
      </td>

      <td>
        Indicates if the trash can was skipped during the cleanup.

        - **Enabled**: Trash can is skipped.
        - **Disabled**: Trash can is not skipped.
      </td>
    </tr>

    <tr>
      <td>
        Created By
      </td>

      <td>
        The user who created the policy.
      </td>
    </tr>

    <tr>
      <td>
        Creation Time
      </td>

      <td>
        The timestamp when the policy was created.
      </td>
    </tr>

    <tr>
      <td>
        Last Modified By
      </td>

      <td>
        The user who last edited the policy.
      </td>
    </tr>

    <tr>
      <td>
        Last Modification Time
      </td>

      <td>
        The timestamp when the policy was last edited.
      </td>
    </tr>

    <tr>
      <td>
        Projects
      </td>

      <td>
        The project name associated with the policy.
      </td>
    </tr>

    <tr>
      <td>
        Included in Projects
      </td>

      <td>
        The projects to which the policy is assigned.
      </td>
    </tr>

    <tr>
      <td>
        Package Types
      </td>

      <td>
        Indicates which projects the GLOBAL policy applies to. It includes:

        **ALL**: This option indicates that the policy is shared with all projects. This is selected when the "Include All Projects" checkbox is checked in the policy settings.

        **N/A**: This option indicates that the policy is not applicable to any specific projects.

        **Note**: Applicable for Global Policies only.
      </td>
    </tr>

    <tr>
      <td>
        Included in Repositories
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        Excluded from Repositories
      </td>

      <td>
        The repositories not affected by the policy.
      </td>
    </tr>

    <tr>
      <td>
        Include Package Name Pattern
      </td>

      <td>
        The name pattern applied to select packages for deleting.
      </td>
    </tr>

    <tr>
      <td>
        Exclude Package Name
      </td>

      <td>
        The name pattern applied to exclude packages from deleting.
      </td>
    </tr>

    <tr>
      <td>
        Age Condition (older than)
      </td>

      <td>
        The age-based condition for selecting packages (for example, older than a specified time).
      </td>
    </tr>

    <tr>
      <td>
        Usage Condition (not downloaded since)
      </td>

      <td>
        The condition for selecting packages based on usage (for example, not downloaded since a certain date).
      </td>
    </tr>

    <tr>
      <td>
        Version (keep last N)
      </td>

      <td>
        The number of latest versions to retain for each package. Older versions of that package are deleted.
      </td>
    </tr>

    <tr>
      <td>
        **Run Detailed Summary**
      </td>

      <td>
        <p>Indicates the detailed cleanup run summary:</p><ul><li><strong>Package name:</strong> The name of the deleted package.</li><li><strong>Version:</strong> The version of the deleted package.</li><li><strong>Size:</strong> The size of the package on the disk.</li><li><strong>Repository:</strong> The repository from which the package was deleted.</li><li><strong>Repository Type:</strong> The type of the repository (For example, Local, Federated).</li><li><strong>Status:</strong> The status of the cleanup operation (For example, deleted).</li><li><strong>Status Message:</strong> A brief message indicating the result of the cleanup operation:<ul><li><strong>Successfully Cleaned:</strong> Package was successfully deleted.</li><li><strong>Cleanup Failure:</strong> Package delete failed. For more information, see <a href="/administration/docs/log-files-location-and-naming#service-log">artifactory-service.log</a>.</li><li><strong>Package Not Found:</strong> Package was not found.</li><li><strong>Archived:</strong> Package was successfully archived.</li><li><strong>Dry Run Status:</strong><ul><li>Dry run successfully processed the package.</li><li>Dry run failed to process the package.</li></ul></li><li><strong>Restore Status:</strong><ul><li>Package restore has not been initialized.</li><li>Package was warmed.</li><li>Package was successfully restored.</li></ul></li></ul></li><li><strong>Package path:</strong> The full path to the package location.</li><li><strong>Created date:</strong> The timestamp when the package was created.</li><li><strong>Modified date:</strong> The timestamp when the package was last edited.</li><li><strong>Last Downloaded date:</strong> The timestamp when the package was last downloaded.</li></ul>
      </td>
    </tr>
  </tbody>
</Table>

* Following are the release bundle cleanup report fields:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Run General Details**
      </td>

      <td>
        The general details of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        cleanup run for `<policy-name>` `<status>`
      </td>

      <td>
        The policy name and current status of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        isDryRun
      </td>

      <td>
        Indicates whether the run was a dry run or an actual run.

        - **True**: Dry run (no changes made).
        - **False**: Actual run (changes applied).
      </td>
    </tr>

    <tr>
      <td>
        Run Start Time
      </td>

      <td>
        The timestamp when the cleanup process started.
      </td>
    </tr>

    <tr>
      <td>
        Duration
      </td>

      <td>
        The total time taken for the cleanup process.
      </td>
    </tr>

    <tr>
      <td>
        **Run Summary**
      </td>

      <td>
        The summary of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        Cleaned release bundles count
      </td>

      <td>
        The total number of cleaned release bundles.
      </td>
    </tr>

    <tr>
      <td>
        Total release bundle count
      </td>

      <td>
        The total number of release bundles processed during the cleanup.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Configuration For This Run**
      </td>

      <td>
        Indicates the configuration details of the policy.
      </td>
    </tr>

    <tr>
      <td>
        Policy Key
      </td>

      <td>
        The name of the cleanup policy used for this run.
      </td>
    </tr>

    <tr>
      <td>
        Description
      </td>

      <td>
        A description of the cleanup policy.
      </td>
    </tr>

    <tr>
      <td>
        Cron Expression
      </td>

      <td>
        The cron expression used to schedule the cleanup runs.
      </td>
    </tr>

    <tr>
      <td>
        Max Run Duration
      </td>

      <td>
        The maximum duration allowed for the policy to run.
      </td>
    </tr>

    <tr>
      <td>
        Created By
      </td>

      <td>
        The user who created the policy.
      </td>
    </tr>

    <tr>
      <td>
        Creation Time
      </td>

      <td>
        The timestamp when the policy was created.
      </td>
    </tr>

    <tr>
      <td>
        Last Modified By
      </td>

      <td>
        The user who last edited the policy.
      </td>
    </tr>

    <tr>
      <td>
        Last Modification Time
      </td>

      <td>
        The timestamp when the policy was last edited.
      </td>
    </tr>

    <tr>
      <td>
        Projects
      </td>

      <td>
        The project name associated with the policy.
      </td>
    </tr>

    <tr>
      <td>
        Included in Projects
      </td>

      <td>
        The projects to which the policy is assigned.
      </td>
    </tr>

    <tr>
      <td>
        Include Release Bundles Names
      </td>

      <td>
        The names of the selected release bundles for deleting.
      </td>
    </tr>

    <tr>
      <td>
        Age Condition (older than)
      </td>

      <td>
        The age-based condition for selecting release bundles (for example, older than a specified time).
      </td>
    </tr>

    <tr>
      <td>
        Not Promoted to Environments
      </td>

      <td>
        The release bundle was not promoted to.
      </td>
    </tr>

    <tr>
      <td>
        **Run Detailed Summary**
      </td>

      <td>
        <p>Indicates the detailed cleanup run summary.</p><ul><li><strong>Release Bundle name:</strong> The name of the deleted release bundle.</li><li><strong>Version:</strong> The version of the deleted release bundle.</li><li><strong>Creation Time:</strong> The Timestamp at which the release bundle created.</li><li><strong>Created by:</strong> The name of the user who created the release bundle.</li><li><strong>Promoted To:</strong> The release bundle promoted to environment.</li><li><strong>Status:</strong> The status of the cleanup operation (for example, deleted).</li><li><strong>Status Message:</strong> A brief message indicating the result of the cleanup operation. The Status Message can be one of the following:<ul><li><strong>Successfully Cleaned:</strong> Release bundle version was successfully deleted.</li><li><strong>Cleanup Failure:</strong> Release bundle version delete failed. For more information, see <a href="/administration/docs/log-files-location-and-naming#service-log">artifactory-service.log</a>.</li><li><strong>Dry Run Status:</strong><ul><li>Dry run successfully processed the release bundle version.</li><li>Dry run failed to process the release bundle version.</li></ul></li><li><strong>Distribution not installed:</strong> Distribution service is unavailable.</li><li><strong>Distribution is installed and the version is never distributed:</strong><ul><li>The release bundle version was successfully deleted.</li><li>The dry run successfully processed the release bundle version.</li></ul></li><li><strong>Distribution is installed and a version was attempted to be distributed but always failed:</strong> Same as when cleaned successfully.</li><li><strong>Distribution is installed and the version was distributed successfully:</strong> Release bundle version is already distributed to one or more edge nodes.</li><li><strong>Distribution is installed and API returns any other response status code:</strong> Unable to validate distribution status due to unknown reasons. For more information, see artifactory-service.log.</li></ul></li></ul>
      </td>
    </tr>
  </tbody>
</Table>

* Following are the build cleanup report fields:

<Table>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **Run General Details**
      </td>

      <td>
        The general details of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        cleanup run for `<policy-name>` `<status>`
      </td>

      <td>
        The policy name and current status of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        isDryRun
      </td>

      <td>
        Indicates whether the run was a dry run or an actual run.

        - **True**: Dry run (no changes made).
        - **False**: Actual run (changes applied).
      </td>
    </tr>

    <tr>
      <td>
        Run Start Time
      </td>

      <td>
        The timestamp when the cleanup process started.
      </td>
    </tr>

    <tr>
      <td>
        Duration
      </td>

      <td>
        The total time taken for the cleanup process.
      </td>
    </tr>

    <tr>
      <td>
        **Run Summary**
      </td>

      <td>
        The summary of the cleanup run.
      </td>
    </tr>

    <tr>
      <td>
        cleanup builds count
      </td>

      <td>
        The total number of builds successfully deleted.
      </td>
    </tr>

    <tr>
      <td>
        Total builds count
      </td>

      <td>
        The total number of builds processed during the cleanup.
      </td>
    </tr>

    <tr>
      <td>
        Builds virtual size
      </td>

      <td>
        The virtual size of all deleted builds.
      </td>
    </tr>

    <tr>
      <td>
        Builds physical size
      </td>

      <td>
        The actual physical size of all deleted builds.
      </td>
    </tr>

    <tr>
      <td>
        **Policy Configuration For This Run**
      </td>

      <td>
        Indicates the configuration details of the policy.
      </td>
    </tr>

    <tr>
      <td>
        Policy Key
      </td>

      <td>
        The name of the cleanup policy used for this run.
      </td>
    </tr>

    <tr>
      <td>
        Description
      </td>

      <td>
        A description of the cleanup policy.
      </td>
    </tr>

    <tr>
      <td>
        Cron Expression
      </td>

      <td>
        The cron expression used to schedule the cleanup runs.
      </td>
    </tr>

    <tr>
      <td>
        Max Run Duration
      </td>

      <td>
        The maximum duration allowed for the policy to run.
      </td>
    </tr>

    <tr>
      <td>
        Skip Trash Can
      </td>

      <td>
        Indicates if the trash can was skipped during the cleanup.

        - **Enabled**: Trash can is skipped.
        - **Disabled**: Trash can is not skipped.
      </td>
    </tr>

    <tr>
      <td>
        Created By
      </td>

      <td>
        The user who created the policy.
      </td>
    </tr>

    <tr>
      <td>
        Creation Time
      </td>

      <td>
        The timestamp when the policy was created.
      </td>
    </tr>

    <tr>
      <td>
        Last Modified By
      </td>

      <td>
        The user who last edited the policy.
      </td>
    </tr>

    <tr>
      <td>
        Last Modification Time
      </td>

      <td>
        The timestamp when the policy was last edited.
      </td>
    </tr>

    <tr>
      <td>
        Selected Projects
      </td>

      <td>
        The project name associated with the policy.
      </td>
    </tr>

    <tr>
      <td>
        Include All Projects
      </td>

      <td>
        The projects to which the policy is assigned.
      </td>
    </tr>

    <tr>
      <td>
        Include Build Names
      </td>

      <td>
        The name pattern applied to include builds for deleting.
      </td>
    </tr>

    <tr>
      <td>
        Age Condition (older than)
      </td>

      <td>
        The age-based condition for selecting builds (for example, older than a specified time).
      </td>
    </tr>

    <tr>
      <td>
        Delete Build Artifacts
      </td>

      <td>
        Indicates if the build artifacts are deleted.
      </td>
    </tr>

    <tr>
      <td>
        **Run Detailed Summary**
      </td>

      <td>
        <p>Indicates the detailed cleanup run summary:</p><ul><li><strong>Build name:</strong> The name of the deleted build.</li><li><strong>Build number:</strong> The number of the deleted build.</li><li><strong>Creation Time:</strong> The timestamp at which the build was created.</li><li><strong>Created By:</strong> The user who created the build.</li><li><strong>Artifacts count:</strong> The number of the artifacts.</li><li><strong>Artifacts virtual size:</strong> The virtual size of artifacts associated with the build.</li><li><strong>Associated Release Bundles:</strong> Build associated with the release bundles.</li><li><strong>Status:</strong> The status of the cleanup operation (For example, deleted).</li><li><strong>Status Message:</strong> A brief message indicating the result of the cleanup operation:<ul><li><strong>Deleted:</strong> Build was successfully deleted.</li><li><strong>Partially Deleted:</strong> Build artifacts were partially deleted. X of Y artifacts deleted successfully. Check the remaining artifacts.</li><li><strong>Error:</strong> Build number delete failed. For more information, see <a href="/administration/docs/log-files-location-and-naming#service-log">artifactory-service.log</a>.</li><li><strong>Skipped:</strong> Unable to delete the build number. For more information, see <a href="/administration/docs/log-files-location-and-naming#service-log">artifactory-service.log</a>. Deletion of build number was skipped due to an associated release bundle. Set a release bundle retention policy first.</li><li><strong>Dry Run Completed:</strong><ul><li>Dry run successfully processed the build.</li><li>Dry run failed to process the build.</li></ul></li><li><strong>Dry Run Error:</strong> Dry run failed to process the build number.</li></ul></li></ul>
      </td>
    </tr>
  </tbody>
</Table>

## Cleanup Policies System Properties

The following properties can be configured in the Artifactory configuration file `$JFROG_HOME/etc/artifactory/artifactory.system.properties`.

| Parameter                                                 | Description                                                                                                        | Default Value |
| :-------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :------------ |
| artifactory.policy.cleanup.csv.file.max.records           | The number of records per CSV report file.                                                                         | 100,000       |
| artifactory.policy.cleanup.nodes\_cleaned.expiration.days | The number of days that deleted artifacts are stored in the temp table that is used for reports (like debug info). | 30            |
| artifactory.policy.cleanup.nodes\_cleaned.job.rate.days   | The frequency (in days) at which the clean temp table job checks for expired deleted artifacts.                    | 10            |
| artifactory.policy.cleanup.concurrency.maxLevel           | The maximum number of threads that can be used for a policy run.                                                   | 5             |
| artifactory.policy.cleanup.batchSize                      | The maximum number of packages that can be requested to be processed at one time.                                  | 10,000        |
| artifactory.policy.cleanup.partition.size                 | The number of items in a group into which one batch is divided during processing.                                  | 1,000         |
| artifactory.policy.cleanup.error.threshold.percent        | The maximum percentage of errors that can occur in a one-run before the run is stopped.                            | 10            |
| artifactory.policy.cleanup.deleted.package.limit          | The maximum number of packages that can be processed during one run.                                               | 100,000       |

<br />