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.
Export customized flows before reinstalling
If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, and you want to preserve those changes, export your flows before reinstalling OpenRAG.
Reinstall TUI-managed containers
-
In the TUI's Status menu (3), click Factory Reset to destroy your OpenRAG containers and some related data.
warningThis is a destructive action that does the following:
- Destroys all OpenRAG containers, volumes, and local images with
docker compose down --volumes --remove-orphans --rmi local. - Prunes any additional container objects with
docker system prune -f. - Deletes the contents of OpenRAG's
configand./opensearch-datadirectories. - Deletes the
conversations.jsonfile.
This operation doesn't remove the
.envfile or the contents of the./openrag-documentsdirectory. - Destroys all OpenRAG containers, volumes, and local images with
-
Exit the TUI with q.
-
Optional: Remove data that wasn't deleted by the Factory Reset operation. For a completely fresh installation, delete all of this data.
- OpenRAG's
.envfile: Contains your OpenRAG configuration, including OpenRAG passwords, API keys, OAuth settings, and other environment variables. If you delete this file, OpenRAG automatically generates a new one after you repeat the setup and onboarding process. Alternatively, you can add a prepopulated.envfile to your OpenRAG installation directory before restarting OpenRAG. - The contents of the
./openrag-documentsdirectory: Contains documents that you uploaded to OpenRAG. Delete these files to prevent documents from being reingested to your knowledge base after restarting OpenRAG. However, you might want to preserve OpenRAG's default documents.
- OpenRAG's
-
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.
If OpenRAG detects a
.envfile during setup and onboarding, it automatically populates any OpenRAG passwords, OAuth credentials, and onboarding configuration set in that file.
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:
-
Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects:
Dockerdocker compose down --volumes --remove-orphans --rmi local
docker system prune -fPodmanpodman compose down --volumes --remove-orphans --rmi local
podman system prune -f -
Optional: Remove data that wasn't deleted by the previous commands:
- OpenRAG's
.envfile - The contents of OpenRAG's
configdirectory - The contents of the
./openrag-documentsdirectory - The contents of the
./opensearch-datadirectory - The
conversations.jsonfile
- OpenRAG's
-
If you deleted the
.envfile, prepare a new.envbefore redeploying the containers. For more information, see Deploy OpenRAG with self-managed services. -
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.
-
Stop all running containers:
Dockerdocker stop $(docker ps -q)Podmanpodman stop --all
-
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: Remove data that wasn't deleted by the previous commands:
- OpenRAG's
.envfile - The contents of OpenRAG's
configdirectory - The contents of the
./openrag-documentsdirectory - The contents of the
./opensearch-datadirectory - The
conversations.jsonfile
- OpenRAG's
-
If you removed all OpenRAG containers, redeploy OpenRAG. If you removed only one container, redeploy that container with the appropriate
docker runorpodman runcommand.