M2 - Uninstall language pack
-
15-02-2021 - |
Question
I installed a language pack using composer.
$ composer require mageplaza/magento-2-german-language-pack:dev-master
$ php bin/magento cache:flush
Now when I try to uninstall again, using this command:
php bin/magento i18n:uninstall mageplaza_de_de
I get the following message:
Package mageplaza_de_de is not a Magento language and will be skipped.
Nothing is removed.
This is what's in the registration.php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
'mageplaza_de_de',
__DIR__
);
How can I uninstall this package?
Solution
I managed to solve this myself.
php bin/magento i18n:uninstall
was already the right command for removing a language pack.
But the name of the language pack is what's written in the composer.json and was added to the project with composer require
. Using the <vendor>_<module>
syntax like for uninstalling modules doesn't work here.
So the full command that worked for me was:
php bin/magento i18n:uninstall mageplaza/magento-2-german-language-pack
(Without the :dev-master)
OTHER TIPS
You can uninstall a module through composer if it was installed using composer. If yes then issue command:
php bin/magento module:uninstall -r mageplaza_de_de
-r flag removes module data. then issue:
php bin/magento setup:upgrade
If module was not installed through composer:
- remove the module directory
app/code/<Vendor>/<Module>
- drop module database tables (if it created any)
- remove entry from core_config_data and setup_module tables
Run command
php bin/magento setup:upgrade