TODO: Uninstall Mathesar¶
The uninstall instructions vary depending on the installation method you chose. Select your installation method below to proceed.
Uninstall a Docker installation of Mathesar¶
Note
Depending on your Docker setup, you may need to run docker
commands with sudo
.
-
Remove Mathesar internal schemas.
If you’d like to continue using your PostgreSQL databases, you can remove the schemas created for Mathesar’s use during installation. For each database accessible through the Mathesar UI, the safe and easy way to do so is to use Mathesar’s new “Disconnect Database” functionality. When disconnecting a database, choose the “Remove Mathesar’s internal schemas” option to safely remove any Mathesar schemas.
If that doesn’t work, or doesn’t work for all databases, you can perform the following manual steps instead:
-
Connect to the database.
-
Delete the types schema.
Deleting this schema will also delete any database objects that depend on it. Specifically, this will delete any data using Mathesar’s custom data types.
-
Delete the function schemas.
-
-
Remove the Mathesar container.
-
Remove the Mathesar Image
-
Remove volumes related to Mathesar
Uninstall a guided script or Docker compose installation of Mathesar¶
-
Remove Mathesar internal schemas.
If you’d like to continue using your PostgreSQL databases, you can remove the schemas created for Mathesar’s use during installation. For each database accessible through the Mathesar UI, the safe and easy way to do so is to use Mathesar’s new “Disconnect Database” functionality. When disconnecting a database, choose the “Remove Mathesar’s internal schemas” option to safely remove any Mathesar schemas.
If that doesn’t work, or doesn’t work for all databases, you can perform the following manual steps instead:
-
Connect to the database.
-
Delete the types schema.
Deleting this schema will also delete any database objects that depend on it. Specifically, this will delete any data using Mathesar’s custom data types.
-
Delete the function schemas.
-
-
Remove all Mathesar Docker images and containers.
-
Remove configuration files.
Uninstall a source installation of Mathesar¶
-
Remove Mathesar internal schemas.
If you’d like to continue using your PostgreSQL databases, you can remove the schemas created for Mathesar’s use during installation. For each database accessible through the Mathesar UI, the safe and easy way to do so is to use Mathesar’s new “Disconnect Database” functionality. When disconnecting a database, choose the “Remove Mathesar’s internal schemas” option to safely remove any Mathesar schemas.
If that doesn’t work, or doesn’t work for all databases, you can perform the following manual steps instead:
-
Connect to the database.
-
Delete the types schema.
Deleting this schema will also delete any database objects that depend on it. Specifically, this will delete any data using Mathesar’s custom data types.
-
Delete the function schemas.
-
-
Stop Caddy service
-
Remove Caddy service file and Caddyfile (requires
sudo
) -
Stop Gunicorn
-
Remove Gunicorn service file
-
Remove your Mathesar installation directory
Your installation directory might be customized
It’s possible that Mathesar could have been installed into a different directory than shown above. Use caution when deleting this directory.
-
Remove Django database
-
Connect to the psql terminal.
-
Drop the Django database.
-