bench reinstall
The bench reinstall command reinstalls an existing Frappe site using the apps currently installed on the bench. During the process, all existing site data is permanently deleted and a fresh installation is created.
Reinstalling a site is a destructive operation. All data stored in the site will be permanently removed. Always create a backup before proceeding.
Usage
bench reinstall [OPTIONS]
What Happens During Reinstallation?
When you run the bench reinstall command, Bench removes all existing site data and recreates the site using the applications currently installed on the bench.
Since this operation deletes all data, Bench displays a confirmation prompt before continuing unless explicitly skipped.
Currently, the bench reinstall command is supported only for MariaDB sites. PostgreSQL support may be added in future releases.
Available Options
| Option | Description |
|---|---|
--admin-password |
Sets the Administrator password for the newly reinstalled site. |
--mariadb-root-username |
Specifies the MariaDB root or privileged username. |
--mariadb-root-password |
Provides the password for the MariaDB root or privileged user. |
Available Flag
| Flag | Description |
|---|---|
--yes |
Skips the confirmation prompt before reinstalling the site. |
Examples
Reinstall a Site Without Interactive Prompts
Skip the confirmation dialog and provide both the MariaDB root password and Administrator password through command-line options.
bench reinstall --site {site} --yes \
--mariadb-root-password {db-pass} \
--admin-password {admin-pass}
Reinstall Using an Alternative Database Administrator
Use another MariaDB user that has sufficient database administration privileges instead of the default root user.
bench reinstall \
--mariadb-root-username {db-user} \
--mariadb-root-password {db-pass}
Always perform a complete site backup before running bench reinstall. Since the process completely resets the site, previously stored data cannot be recovered unless a backup is available.