Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove react native package from android

I'd uninstalled react-native-reanimated. Had unlinked it before removal.

Output:

> npx react-native unlink react-native-reanimated
warn Calling react-native unlink [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Unlinking "react-native-reanimated" iOS dependency
info iOS module "react-native-reanimated" has been successfully unlinked
info Android module "react-native-reanimated" is not installed

Followed by:

npm un react-native-reanimated

However, when I open the project in Android Studio, the package is still listed.

Where is configuration stored and how do I remove it?

enter image description here

like image 361
hackerl33t Avatar asked Nov 30 '25 03:11

hackerl33t


1 Answers

To disable autolinking for a specific package you can define this in a react-native.config.js file.

   // react-native.config.js
    module.exports = {
      dependencies: {
        'some-unsupported-package': {
          platforms: {
            android: null, // disable Android platform, other platforms will still autolink if provided
          },
        },
      },
    };

More: Disable autolinking for a specific library on different platforms

like image 179
Nagy Szili Avatar answered Dec 06 '25 13:12

Nagy Szili