I am running a Magento 2.3.6 system and I built my own theme which inherits from Magento/blank. Since I don't need the Luma theme, I want to properly get rid of it.
I followed the instructions from magento dev and tried to remove the theme via ssh console:
php bin/magento theme:uninstall --backup-code frontend/Magento/luma
However, I can't because of this error:
frontend/Magento/luma is not an installed Composer package
This is very confusing because on my cloned stage server it worked smoothly and I did not change any composer packages or manually edits.
So I checked all my files and tried to verify the frontend/Magento/luma location. I can see from multiple commands, that frontend/Magento/luma is definitely available and shown.
I also checked the folder at
vendor/magento/theme-frontend-luma
and all the necessary files like
composer.json
registration.php
theme.xml
are there.
What am I missing? The theme is obviously installed and all the files are there. I was expecting some dependency issues but not this.
Best Answer
It was an issue with my SSH environment. Apparently, a new
composer.json
was created in the root folder of my server. Somehow the references were messed up even though other folders (with stages) were not affected. After removing the file, it worked.