How to Delete a Theme of Magento 2.3, and Magento 2.4?

There are several ways to delete a theme of Magento 2.3. and Magento2.4. Here I will share with you a simple way by Phpmyadmin.

Find the “theme” table and remove the record of the useless theme.

Remember the theme id, say 4. Run:

SELECT * FROM core_config_data WHERE core_config_data.value = ‘4’
delete the record;

Next, run:

php bin/magento indexer:reindex
php bin/magento cache:flush

If you forgot to delete the theme id from core_config_data, you will get the following error message when you login the admin panel:

Something went wrong while saving this configuration: Unable to load theme by specified key: ‘4’

How to solve this issue then?

 

SELECT * FROM core_config_data WHERE core_config_data.value = ‘4’
delete the record;

Next, run:

php bin/magento indexer:reindex
php bin/magento cache:flush

Another method: devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-theme-uninstall.html