Sometimes when developing your app you may decide not to use a certain plugin anymore or you come across some errors that are caused because of a plugin. Depending on the error, it’s sometimes fixed by removing platforms and adding them again, but in this article we will focus on removing Cordova plugins from ionic.
So first thing’s first, let’s get a list of installed plugins
$ ionic cordova plugin list
This will list all the installed Cordova plugins within that project
let’s say we want to remove
We can proceed with
$ ionic cordova plugin remove cordova-base64-to-gallery
you can find the name of the plugin in the cordova plugin list
Next since this is an ionic native plugin we need to remove it from
Now go ahead and run
$ npm uninstall @ionic-native/base64-to-gallery
After this make sure to remove the
import from your file where you have imported that plugin and remove it from the
Now you are done. But just to be on the safe side after i remove a plugin i always run
$ ionic cordova platform remove android
$ ionic cordova platform remove ios
And than i add them again
$ ionic cordova platform add android
$ ionic cordova platform add ios
Now after the platforms are added again you are all set and can continue with development.
Thanks and cya in the next one.