> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on Atlan objects, use the Atlan MCP server at https://api.atlan.com/mcp or the atlanai CLI; `atlanai --map json` prints its command map. Run a read-only identity check before any write.
> The docs MCP server at /mcp searches these docs only. It cannot read or change Atlan objects.
> SDK packages: Python `atlanai` (PyPI) and TypeScript `@atlanai/sdk` (npm). Show Python first, then TypeScript.

# Archive files

> Remove a file artifact from default discovery without erasing its version history.

Archiving removes a file from default discovery and listing results without erasing its version history. The command asks for confirmation before archiving — inspect the file record first to confirm you have the correct target.

## Before you start

* Confirm the CLI is installed and `atlanai doctor` passes. See [Install atlanai CLI](/tools/cli/how-tos/install).
* Confirm `atlanai auth status` shows the expected account.
* Confirm an active workspace context is set by running `atlanai context show`.
* Confirm the file record with `atlanai file get file_123` before archiving. Verify the published path and workspace match the file you intend to remove.

## Archive file

The command asks for confirmation before proceeding. Pass `--confirm` only after resolving the exact target.

```bash theme={null}
atlanai file delete file_123
```

## Troubleshooting

For errors from `file delete` or authentication failures, see [File operation errors](/tools/cli/troubleshooting/file-operation-errors).

## Next steps

* [Automate workflows](/tools/cli/how-tos/api-automation): Script file operations non-interactively in CI.

## See also

* [Find and inspect files](/tools/cli/how-tos/files-inspect): Confirm the file record before archiving.
* [Upload files](/tools/cli/how-tos/files): Upload a replacement file after archiving.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.