Uninstall or reinstall Adobe Commerce

Before you use these commands, you must install the application.

Update the application

To update the application:

  • If you installed the software from an archive or if you used ‘composer-create-project’, see the Upgrade Guide.
  • If you are a contributing developer (that is, you used git clone), see Update the application.

Reinstall the application

The way you reinstall the application from the command line depends on your role:

Uninstall the application

Uninstalling the application drops and restores the database, removes the deployment configuration, and clears directories under var.

To uninstall the application, enter the following command:

bin/magento setup:uninstall

The following message displays to confirm a successful uninstallation:

[SUCCESS]: Magento uninstallation complete.

Optionally keeping generated files

By default, bin/magento setup:upgrade clears compiled code and the cache. Typically, you use bin/magento setup:upgrade to update components and each component can require different compiled classes.

However, in some situations (particularly, deploying to production), you might wish to avoid clearing compiled code because it can take some time. (The cache is still cleared.) To update the database schema and data without clearing compiled code, enter:

bin/magento setup:upgrade --keep-generated
WARNING
The optional --keep-generated option should be used in limited circumstances by experienced system integrators only. This option should never be used in a development environment. Improper use of this optional parameter can cause errors during code execution.

Install the application

recommendation-more-help
0f8e7db5-0e9c-4002-a5b8-a0088077d995