> For the complete documentation index, see [llms.txt](https://documentation.alluxio.io/ee-ai-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.alluxio.io/ee-ai-en/ai-3.3/feature/cache-free.md).

# Cache Free

## Cache Free Overview

The free operation provides options to force data eviction to manually manage cache space.

### Freeing Cache Space via Command Line

Usage: `bin/alluxio job free [flags]`

* Submit a free job:

```shell
$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://bucket/path --submit
```

* View the progress a free job:

```shell
$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://alluxio/path --progress
Progress for Free path file 's3://alluxio/path':
	Job Id: b21ce9fb-f332-4d39-8bb4-554f9a4fa601
	Job Submitted: Fri Feb 02 21:28:56 CST 2024
	Job path: s3://alluxio/path
	Job State: SUCCEEDED, finished at Fri Feb 02 21:29:01 CST 2024
	Free Info :	totalFile:4 totalByte:3072.00KB
	Free Files Failed: 0
	Free Bytes Failed: 0B
	Free Files Succeeded: 4
	Free Bytes Succeeded: 3072.00KB
```

* Stop and interrupt a running free job: Note this will leave some files remaining in the cache

```shell
$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://alluxio/path --stop
```

```shell
Parameter Description：
--path [all] the ufs path
--batch-size [submit] The speed of free files per second per worker
--force [submit] Trigger free even if some workers are offline
--verbose [progress] Verbose output
--format string [progress] Format of output, either TEXT or JSON (default "TEXT")
```

### Freeing Cache Space via REST API

* Submit a free job:

```shell
curl -H "Content-Type: application/json" -v -X POST http://coordinator_host:19999/api/v1/master/submit_job/free -d '{
	"path": "s3://alluxio/path",
	"options": {
	"batchSize": "200"
	}
}'
```

* View the progress of a free job:

```shell
curl -H "Content-Type: application/json" -v -X GET http://coordinator_host:19999/api/v1/master/progress_job/free -d '{
	"path": "s3://alluxio/path",
	"format": "JSON",
	"verbose": "true"
}'
```

* Stop and interrupt a running free job: Note this will leave some files remaining in the cache

```shell
curl -H "Content-Type: application/json" -v -X POST http://coordinator_host:19999/api/v1/master/stop_job/free -d '{
	"path": "s3://alluxio/path"
}'
```

The free jobs can be list by sending a POST request.

```shell
curl http://ip:1999/api/v1/master/list_job?job-type=FREE[&job-state=[RUNNING|VERIFYING|STOPPED|SUCCEEDED|FAILED|ALL]]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.alluxio.io/ee-ai-en/ai-3.3/feature/cache-free.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
