Skip to main content

bench uninstall-app

The bench uninstall-app command removes an application from a Frappe site along with its associated modules and DocTypes. Before uninstalling, Bench verifies that the application exists on the site and then proceeds to remove all linked records.

The application does not need to be present in the current bench directory to execute this command. As long as it is installed on the site, it can be uninstalled.

Warning:

Uninstalling an application permanently removes its modules and DocTypes from the site. It is recommended to take a backup before proceeding.

Usage

bench uninstall-app [OPTIONS] APP

What Happens During Uninstallation?

When executed, Bench checks whether the specified application is installed on the site. If found, it removes the application’s modules, DocTypes, and related metadata from the database.

By default, Bench asks for confirmation before starting the uninstall process to prevent accidental data loss.

Available Flags

Flag Description
-y, --yes Skips the confirmation prompt before uninstalling the application.
--dry-run Displays the list of DocTypes that would be removed without actually uninstalling the application.
--no-backup Skips creating a site backup before uninstalling the application.
--force Forces the application to be removed from the site even if errors are encountered.

Examples

Preview the Uninstall Operation

Perform a dry run to view the DocTypes that would be deleted without making any changes.

bench --site {site} uninstall-app {app} --dry-run

Skip Creating a Backup

Uninstall the application without taking a site backup beforehand.

bench --site {site} uninstall-app {app} --no-backup

Force Uninstall an Application

Force the application to be removed even if Bench encounters issues during the uninstall process.

bench --site {site} uninstall-app {app} --force

Skip the Confirmation Prompt

Run the uninstall operation without the interactive confirmation dialog.

bench --site {site} uninstall-app {app} --yes

Best Practice:

Use the --dry-run option first to review the affected DocTypes, and ensure you have a recent backup before uninstalling an application from a production site.

Rating: 0 / 5 (0 votes)