The following snippets are used to remove your Magento installation(s).

This is irreversible so make sure you know what you are doing!

Remove a Magento 1 installation

In order to uninstall/remove a Magento 1 installation, run the following command:

This will delete the default database (YOURAPPNAME_preinstalled_Magento), and recursively delete the /data/web/public directory.
Any instances of Magento installed in other directories will not be touched.

Remove a Magento 2 installation

For Magento 2 there is not a magerun plugin available to uninstall the files yet.
We can therefore remove the installation by hand.

For the production installation:

Or to remove a staging environment:

Manually remove any installation

To manually remove all databases and files of both the staging and production, use the following snippet:

Then remove all Magento files, use the following command:

Keep in mind: After removing your Magento content and database, sometimes you need to remove or adjust your Nginx configuration in /data/web/nginx too, in order to start with a clean slate.

00