> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-style-guide-models-artifacts-20260603-165211.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Manage where W&B stores artifact files and how to clean up the local artifact cache.

# Manage artifact storage

W\&B stores artifact files in a private Google Cloud Storage bucket located in the United States by default. All files are encrypted at rest and in transit.

For sensitive files, we recommend you set up [Private Hosting](/platform/hosting/) or use [reference artifacts](/models/artifacts/track-external-files/).

During training, W\&B locally saves logs, artifacts, and configuration files in the following local directories:

| File                         | Default location       | To change default location set:                                     |
| ---------------------------- | ---------------------- | ------------------------------------------------------------------- |
| logs                         | `./wandb`              | `dir` in `wandb.init()` or set the `WANDB_DIR` environment variable |
| artifacts                    | `~/.cache/wandb`       | the `WANDB_CACHE_DIR` environment variable                          |
| configs                      | `~/.config/wandb`      | the `WANDB_CONFIG_DIR` environment variable                         |
| staging artifacts for upload | `~/.cache/wandb-data/` | the `WANDB_DATA_DIR` environment variable                           |
| downloaded artifacts         | `./artifacts`          | the `WANDB_ARTIFACT_DIR` environment variable                       |

For a complete guide to using environment variables to configure W\&B, see the [environment variables reference](/models/track/environment-variables/).

<Warning>
  Depending on the machine where `wandb` is initialized, these default folders may not be located in a writable part of the file system. This might trigger an error.
</Warning>

## Clean up local artifact cache

W\&B caches artifact files to speed up downloads across versions that share files in common. Over time this cache directory can become large. To prune the cache and remove any files you haven't used recently, run the [`wandb artifact cache cleanup`](/models/ref/cli/wandb-artifact/wandb-artifact-cache/) command.

For example, the following code snippet demonstrates how to limit the size of the cache to 1GB:

```bash theme={null}
wandb artifact cache cleanup 1GB
```
