Reinstall OpenRAG
You can reset your OpenRAG deployment to its initial state by recreating the containers and deleting accessory data, such as the .env file and ingested documents.
These are destructive operations that reset your OpenRAG deployment to an initial state. Destroyed containers and deleted data are lost and cannot be recovered after running these operations.
Reinstall TUI-managed containers
- If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, export your flows before starting this process. Although OpenRAG can preserve changes to the built-in flows, it doesn't preserve user-created flows. As a general best practice, exporting your flows is recommended to create backups of your customizations. Afterwards, you can reimport your flows or reference the exported flow JSON as needed.
-
In the TUI, click Status, and then click Factory Reset to reset your OpenRAG containers.
warningThis is a destructive operation that does the following:
- Destroys all OpenRAG containers, volumes, and local images.
- Prunes any additional container objects.
- Deletes the contents of the
~/.openragdirectory except for OpenRAG's.envfile and the/documentssubdirectory.
-
Press Esc to close the Status page, and then press q to exit the TUI.
-
Optional: Delete or edit OpenRAG's
.envfile, which is stored at~/.openrag/tui.This file contains your OpenRAG configuration, including OpenRAG passwords, API keys, OAuth settings, and other environment variables. If you delete this file, the TUI automatically generates a new one after you repeat the setup and onboarding process. If you preserve this file, the TUI can read values from the existing
.envfile during setup and onboarding. -
Optional: Remove any files from the
~/.openrag/documentssubdirectory that you don't want to reingest after redeploying the containers. It is recommended that you preserve OpenRAG's default documents. -
Restart the TUI with
uv run openragoruvx openrag. -
Repeat the setup process to configure OpenRAG and restart all services. Then, launch the OpenRAG app and repeat the application onboarding process.
Reinstall self-managed containers with docker compose or podman compose
Use these steps to reinstall OpenRAG containers with streamlined docker compose or podman compose commands:
- If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, export your flows before starting this process. Although OpenRAG can preserve changes to the built-in flows, it doesn't preserve user-created flows. As a general best practice, exporting your flows is recommended to create backups of your customizations. Afterwards, you can reimport your flows or reference the exported flow JSON as needed.
-
Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects.
warningThis is a destructive operation that does the following:
- Destroys all OpenRAG containers, volumes, and local images.
- Prunes any additional container objects.
- Deletes the contents of the
~/.openragdirectory except for OpenRAG's.envfile and the/documentssubdirectory.
Dockerdocker compose down --volumes --remove-orphans --rmi local
docker system prune -fPodmanpodman compose down --volumes --remove-orphans --rmi local
podman system prune -f -
Optional: Edit OpenRAG's
.envfile if needed. -
Optional: Remove any files from the
~/.openrag/documentssubdirectory that you don't want to reingest after redeploying the containers. It is recommended that you preserve OpenRAG's default documents. -
Redeploy OpenRAG:
Dockerdocker compose up -dPodmanpodman compose up -d -
Launch the OpenRAG app, and then repeat the application onboarding process.
Reinstall self-managed containers with discrete docker or podman commands
Use these commands to remove and clean up OpenRAG containers with discrete docker or podman commands.
If you want to reinstall one container, specify the container name in the commands instead of running the commands on all containers.
- If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, export your flows before starting this process. Although OpenRAG can preserve changes to the built-in flows, it doesn't preserve user-created flows. As a general best practice, exporting your flows is recommended to create backups of your customizations. Afterwards, you can reimport your flows or reference the exported flow JSON as needed.
-
Stop all running containers:
Dockerdocker stop $(docker ps -q)Podmanpodman stop --all -
Remove and clean up containers:
-
Remove all containers, including stopped containers:
Dockerdocker rm --force $(docker ps -aq)Podmanpodman rm --all --force -
Remove all images:
Dockerdocker rmi --force $(docker images -q)Podmanpodman rmi --all --force -
Remove all volumes:
Dockerdocker volume prune --forcePodmanpodman volume prune --force -
Remove all networks except the default network:
Dockerdocker network prune --forcePodmanpodman network prune --force -
Clean up any leftover data:
Dockerdocker system prune --all --force --volumesPodmanpodman system prune --all --force --volumes
-
-
Optional: Edit OpenRAG's
.envfile if needed. -
Optional: If you removed all containers or specifically the OpenSearch container, then you can remove any files from the
~/.openrag/documentssubdirectory that you don't want to reingest after redeploying the containers. It is recommended that you preserve OpenRAG's default documents. -
If you removed all OpenRAG containers, redeploy OpenRAG. If you removed only one container, redeploy that container with the appropriate
docker runorpodman runcommand.