Developer's Guide to Using the Uninstall-App Feature in Empress

Introduction

Welcome to our comprehensive developer’s guide on the uninstall-app feature in Empress. This feature is one of the core functionalities that aid in maintaining the system architecture of your software. It provides the ability to remove an application and its linked doctypes, modules from your site.

Understanding Uninstall-App

The uninstall-app command is used to remove an application from your site, along with its linked doctypes and modules. The command executes a series of checks to confirm the presence of the app on the site before attempting to delete its modules and doctypes. The beauty of this feature is that the application does not necessarily need to be installed on the bench to run the uninstall-app command.

Here is the basic usage of the command:

bench uninstall-app [OPTIONS] APP

Command Flags

The uninstall-app command has several optional flags that provide additional functionalities to developers:

  1. -y, --yes: This flag is used to bypass the confirmation prompt for uninstalling the app.
  2. --dry-run: This flag lists all doctypes that will be deleted on running the command.
  3. --no-backup: This flag bypasses the backup process for the site before uninstalling the app.
  4. --force: This flag forces the removal of the app from the site.

Examples

Here are some typical examples of how to use the uninstall-app command:

  1. To perform a dry run and see the exact changes that would occur on running the command:
bench --site {site} uninstall-app {app} --dry-run
  1. To uninstall an application without taking a backup first:
bench --site {site} uninstall-app {app} --no-backup
  1. To forcibly remove an application from the site:
bench --site {site} uninstall-app {app} --force
  1. To uninstall an application without the interactive prompt for confirmation:
bench --site {site} uninstall-app {app} --yes

Conclusion

The uninstall-app feature is a crucial component in the overall development and customization of business solutions in Empress. Its ease of use and flexibility allows developers to maintain system integrity while customizing the software’s functionality to suit specific business needs. Mastering this feature will significantly enhance your ability to manage applications on your site, leading to better overall performance and user experience.