Uninstall the Magento extension with its associated database tables and settings

Uninstall the Magento extension with its associated database tables and settings

July 19, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Uninstall the Magento extension with its associated database tables and settings

Uninstalling Magento Extensions: Deleting Database Tables and Config Settings

As a Magento developer, you’ll often need to uninstall extensions that are no longer required or have issues. However, simply removing the files from your filesystem doesn’t completely clean up the system—database tables and config settings can linger.

Understanding the Problem

When you install an extension in Magento, it typically creates its own database tables for storing data related to the module’s functionality. It also stores configuration values in the core_config_data table under its own configuration path. The installed status of the module is stored in the core_resource table.

If you uninstall the extension using the interface or by directly deleting the files, Magento doesn’t automatically clean up these remaining elements. This can lead to database clutter and potential conflicts if you try to reinstall the same extension or install a different one with overlapping functionality.

Step-by-Step Uninstallation

1. Deleting Database Tables Manually

You can use MySQL commands to manually delete the tables created by the extension. However, this requires careful identification of which tables are related to the module you’re uninstalling. You can find these in the setup/install-<version>/sql/<module-name>.sql file included with the extension.

For example, if you’re uninstalling an extension named “Ves Magento 2 Customizer”, you would look for a file like this:

setup/install/ves_magento2_customizer_1.0.0/sql/ves-magento2-customizer-setup-install-1.0.0.sql

Here’s how to delete the tables using MySQL:

DROP TABLE IF EXISTS `ves_magento2_customizer_config`;
DROP TABLE IF EXISTS `ves_magento2_customizer_styles`;
-- Add other table names here as needed based on the SQL file

2. Removing Configuration Settings

The core_config_data and core_resource tables store settings for all installed modules. To remove a specific extension’s settings, you need to query these tables.

For instance, if you want to delete configuration values related to “Ves Magento 2 Customizer”:

DELETE FROM core_config_data WHERE path LIKE 'ves_magento2_customizer%';

3. Handling Database Updates and Version Control

Some extensions store their version number in the core_resource table to keep track of updates. Deleting this record can cause issues if you try to reinstall the extension later.

To delete the resource record:

DELETE FROM core_resource WHERE code = 'ves_magento2_customizer';

Best Practices for Clean Uninstallation

  1. Always backup your database before performing any manual deletions. This ensures you can restore data if something goes wrong.
  2. Check the extension’s documentation or support page for specific uninstall instructions, as some modules may have their own cleanup scripts.
  3. Test in a development environment first to ensure the process works correctly before applying it to your live site.

Conclusion

Uninstalling Magento extensions requires more than just deleting files—you must also clean up the associated database tables and configuration settings. By following these steps, you can ensure a complete uninstall that leaves no “leftovers” in your system.

Remember, working with the database directly is a sensitive operation. Always ensure you have a backup of your data before proceeding. If you’re unsure about any part of the process, it’s best to consult with a professional Magento developer or support from Laravel Company for expert guidance.

Your database and filesystem should be clean and optimized for peak performance after a proper uninstallation process. Happy coding!

[Learn more about Magento extension development and optimization at https://laravelcompany.com/magento-development/]

Magento 2 Database Extensions Configuration

Our network