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.
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
| Goal | Mode to use |
|---|---|
| Purge all data from an instance | All Data — runs FLUSHALL to remove everything |
| Free memory occupied by data that has expired but not yet been evicted | Expired 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
Disabling the FLUSHALL command in Parameter Settings does not affect the Clear Data feature in the console.
Purge instance data
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.
On the Instance Information page, click Clear Data in the upper-right corner.
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.
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
| API | Description |
|---|---|
| FlushInstance | Purges all data from an instance |
| FlushExpireKeys | Purges expired keys from an instance |
| FlushInstanceForDB | Purges all data from a specified DB of an instance |
What's next
Clear expired keys — learn how to delete expired keys manually
Use OOS to periodically delete expired keys of Tair or Redis — schedule automatic expired-key deletion on a regular basis