# The token may only read, so it cannot clean the remote cache

What "the token may only read from the remote cache, so it can't remove entries" means and how to fix it.

```text
error: the token may only read from the remote cache at https://cache.example.com, so it can't remove entries
hint: Use a token whose access is rw, such as the one CI uploads with.
```

## Why it happens

[`axle cache clean --remote`](https://axlers.dev/docs/reference/cache.md#the-remote-cache) asked `axle-server` to remove entries, and the server answered `403`: the token is one that may only read, such as a `dev:r:…` token in [`AXLE_SERVER_TOKENS`](https://axlers.dev/docs/reference/remote-cache.md#running-axle-server). Removing entries takes the same access as uploading them.

## How to fix it

Run it with a token whose access is `rw`:

```sh
AXLE_REMOTE_CACHE_TOKEN="$CI_TOKEN" axle cache clean --remote
```

Or log in with one first with [`axle login`](https://axlers.dev/docs/reference/remote-cache.md#logging-in).
