All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Purge data

Last Updated:Mar 28, 2026

Use the Clear Data feature in the Tair (Redis OSS-compatible) console to purge all data or only expired data from an instance. This is useful when resetting an instance, or when you need to reclaim memory held by expired data that Redis has not yet evicted.

Warning

Purged data cannot be recovered. The operation takes effect immediately and affects your online services. Proceed with caution. Back up the instance before proceeding. See Automatic or manual backup.

When to purge data

GoalMode to use
Purge all data from an instanceAll Data — runs FLUSHALL to remove everything
Free memory occupied by data that has expired but not yet been evictedExpired Data — runs SCAN to remove expired data in batches

Prerequisites

Before you begin, ensure that you have:

  • A Tair (Redis OSS-compatible) instance

  • A recent backup of the instance data

Note

Disabling the FLUSHALL command in Parameter Settings does not affect the Clear Data feature in the console.

Purge instance data

  1. Log on to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. On the Instance Information page, click Clear Data in the upper-right corner.

  3. In the dialog that appears, select the data to purge:

    Figure 1. Purge data清除数据

    • All Data: Runs the FLUSHALL command to purge all data from the instance. The data cannot be recovered.

    • Expired Data: Runs the SCAN command to purge all expired data in batches. The data cannot be recovered. Choose to Execute Now or schedule the task to run during the maintenance window.

  4. Click OK and complete the secondary authentication as prompted — for example, Multi-Factor Authentication (MFA). You will not need to authenticate again for 15 minutes.

FAQ

Why does the instance show "Accelerating Expired Data Purge" even though I selected "Execute During Maintenance Window"?

The instance does not delete expired data in advance. This status does not affect the services that the instance provides. The instance purges expired data at an accelerated rate only during the maintenance window.

Why can't I run FLUSHALL or FLUSHDB in Data Management (DMS)?

FLUSHDB and FLUSHALL are high-risk commands and are disabled in DMS. To run them, use the Clear Data feature in the console (as described in this topic) or a Redis client such as redis-cli.

API reference

APIDescription
FlushInstancePurges all data from an instance
FlushExpireKeysPurges expired keys from an instance
FlushInstanceForDBPurges all data from a specified DB of an instance

What's next