---
title: "Refresh directory cache"
method: POST
path: "/vfs/refresh"
---

# Refresh directory cache

`POST /vfs/refresh`

Refreshes one or more directories in the VFS cache, optionally recursively.

## Query parameters

- `fs` string
- `recursive` boolean
- `params` object
- `_group` string
- `_async` boolean

## Headers

- `Prefer` 'respond-async'

## Request body

- VfsRefreshRequest
  - `fs` string — Optional VFS identifier whose directory cache should be refreshed.
  - `recursive` boolean — Set to true to refresh entire directory trees.
  - `_group` string — Assign the request to a custom stats group.
  - `_async` boolean — Run the command asynchronously. Returns a job id immediately.

## Response `200`

Acknowledgement of directories refreshed in the VFS cache.

- object
  - `result` object, required — Map of refreshed directories to status messages.

## Other responses

- `202` — Request accepted for async processing. Poll /job/status with the returned jobid.
- `4XX` — Any error response (HTTP 4xx/5xx)
- `5XX` — Any error response (HTTP 4xx/5xx)

---

[API](https://skmtc.net/rclone/apis/rclone-rc-api.md) · [All operations](https://skmtc.net/rclone/apis/rclone-rc-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rclone/rclone-rc-api/versions/2849bf2803ce/schema)
