# CLAUDE_CODE_PLUGIN_CACHE_DIR

> It moves the whole plugins folder, not just the cache.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_PLUGIN_CACHE_DIR=/srv/claude-plugins

## Think of it like

It is like you move the whole shelf, not just one box on it.

## Definition

CLAUDE_CODE_PLUGIN_CACHE_DIR moves the folder that holds all your plugins. By default it is in ~/.claude/plugins. The name says cache, but it moves the whole plugins folder. The cache and the stores you get plugins from both sit under it.

## Example

Jack's home folder has little space, and plugins fill it. He moves the plugins folder to a bigger disk.

## Example code

```bash
export CLAUDE_CODE_PLUGIN_CACHE_DIR=/srv/claude-plugins
claude
```

Keep plugins on a shared disk.

## Why it matters

Plugins and their marketplaces can grow large. This lets them live where there is room.

## Common mistake

Pointing it at a cache folder inside the plugins folder. It wants the plugins folder itself.

## Three principles

- **Whole plugins folder.** Not just cache.
- **Default.** ~/.claude/plugins.
- **Holds marketplaces.** And the cache.

## Related terms

- [Claude Code Plugin](https://learn.benibix.com/term/ai/claude-code-plugin)
- [Plugin Marketplace](https://learn.benibix.com/term/ai/plugin-marketplace)
- [CLAUDE_CONFIG_DIR](https://learn.benibix.com/term/ai/claude-config-dir-variable)

![Two config folders side by side: one for each account, picked by CLAUDE_CONFIG_DIR.](https://learn.benibix.com/diagrams/env-config-dir.svg)

---

Source: https://learn.benibix.com/term/ai/claude-code-plugin-cache-dir-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
