Helm charts
Kubernetes
local storage
package management
DevOps

Where are helm charts stored locally?

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Helm stores local data in several directories, and confusion usually comes from mixing cache paths with chart source folders. There is no single universal chart location that works on every machine. The reliable way to find Helm paths is to query Helm itself and then inspect the specific directory type you need.

Understand Helm Local Path Categories

Helm local data is split into three categories:

  • cache data, such as repository indexes
  • config data, such as repository definitions
  • data directory, used by plugins and related files

Print active paths with one command:

bash
helm env

Key variables to look for:

  • 'HELM_CACHE_HOME'
  • 'HELM_CONFIG_HOME'
  • 'HELM_DATA_HOME'

These values reflect real runtime behavior, including any environment overrides in CI or shell startup files.

Inspect Repository Configuration and Cache

Repository definitions are stored in configuration files, while repository index content is cached separately. This distinction matters when debugging stale chart search results.

Useful commands:

bash
helm repo list
helm repo update

If you want to see actual files, inspect the resolved paths:

bash
1echo "$HELM_CONFIG_HOME"
2echo "$HELM_CACHE_HOME"
3ls -la "$HELM_CONFIG_HOME/helm"
4ls -la "$HELM_CACHE_HOME/helm/repository"

A common pattern is that repositories.yaml lives in config, and downloaded index artifacts live in cache.

Chart Source Folder Versus Cached Artifacts

When you create a chart with helm create, Helm writes a normal project directory at your current location. That is your source code, not internal cache.

bash
mkdir -p ~/work/charts
cd ~/work/charts
helm create checkout-service

Resulting folder:

text
~/work/charts/checkout-service/

When you pull a chart from a remote repository, the archive is saved to your chosen destination, often the current directory.

bash
helm pull bitnami/nginx --version 15.0.0 --destination ./downloads
ls -la ./downloads

This downloads folder is also user-managed workspace content, not Helm cache internals.

Platform Defaults and Why They Vary

On Linux and macOS, Helm often follows XDG-style directories. On Windows, paths typically map to user AppData locations. The exact location can still vary by environment variables, shell wrappers, and CI runners.

Because of that variation, avoid hardcoded path assumptions in scripts. Resolve paths at runtime:

bash
1CACHE_HOME="$(helm env | awk -F= '/HELM_CACHE_HOME/ {gsub(/\"/, "", $2); print $2}')"
2CONFIG_HOME="$(helm env | awk -F= '/HELM_CONFIG_HOME/ {gsub(/\"/, "", $2); print $2}')"
3
4printf 'cache=%s\nconfig=%s\n' "$CACHE_HOME" "$CONFIG_HOME"

If your automation runs in containers, this is even more important because home directories are often ephemeral.

Plugin and Registry Data

Helm plugins add another local layer. Plugin binaries and metadata are typically managed under HELM_DATA_HOME and related plugin directories. If a plugin works locally but fails in CI, compare these resolved paths first.

For OCI workflows, local auth and pull behavior may use registry configuration tied to your Helm and container runtime setup. Keep credentials handling explicit and avoid committing local auth files.

Safe Cleanup Strategy

If local Helm state looks corrupted, prefer targeted cleanup over deleting everything:

  • run helm repo update first
  • remove only stale repository cache entries
  • keep chart source directories outside Helm-managed paths
  • back up plugin configuration before deleting data directories

A simple refresh routine:

bash
1helm repo remove my-temp-repo || true
2helm repo add my-temp-repo https://example.com/charts
3helm repo update
4helm search repo my-temp-repo

This usually fixes index mismatch issues without losing unrelated setup.

Common Pitfalls

  • Treating chart project folders created by helm create as Helm cache, which leads to accidental deletion of source code.
  • Hardcoding one OS-specific path in scripts instead of reading helm env at runtime.
  • Editing cache files directly rather than using helm repo commands.
  • Assuming CI runners keep Helm cache between jobs, then relying on stale local indexes.
  • Deleting all Helm directories during troubleshooting and losing plugin or repository configuration.

Summary

  • Helm uses multiple local directories for cache, config, and data.
  • 'helm env is the canonical source for current active paths.'
  • Chart source directories are user workspace content, not Helm internal storage.
  • Repository metadata and cached indexes live in different places.
  • Use targeted cleanup and runtime path discovery for reliable local and CI behavior.

Course illustration
Course illustration

All Rights Reserved.