how to delete installed library form react native project
If you want to unlink already installed packages in react native
$ react-native unlink package_name
$ yarn remove package_name
(if it is npm then npm uninstall --save)
If you execute 2nd step before 1st step you need to install relevant package back and execute 2nd step
I followed the following steps:--
react-native unlink <lib name>
-- this command has done the unlinking of the library from both platforms.react-native uninstall <lib name>
-- this has uninstalled the library from the node modules and its dependenciesManually removed the library name from package.json
-- somehow the --save command was not working for me to remove the library declaration from package.json.
After this I have manually deleted the empty react-native library from the node_modules folder
- If it is a library based only on javascript, than you can just run
npm uninstall --save package_name
ornpm uninstall --save-dev package_name
- If you've installed a library with native content that requires linking, and you've linked it with rnpm then you can do:
rnpm unlink package_name
then follow step 1 - If you've installed a library with native content manually, then just undo all the steps you took to add the library in the first place. Then follow step 1.
note rnpm as is deprecated