{"id":15036592,"url":"https://github.com/pmadruga/react-native-clean-project","last_synced_at":"2025-05-14T15:00:28.178Z","repository":{"id":41262875,"uuid":"77251504","full_name":"pmadruga/react-native-clean-project","owner":"pmadruga","description":"Automating the clean up of a React Native project","archived":false,"fork":false,"pushed_at":"2023-12-28T11:46:44.000Z","size":715,"stargazers_count":1236,"open_issues_count":19,"forks_count":54,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T02:55:53.793Z","etag":null,"topics":["react","react-native","reactnative"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmadruga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["pmadruga"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2016-12-23T21:29:36.000Z","updated_at":"2025-04-11T07:41:01.000Z","dependencies_parsed_at":"2023-12-03T10:20:57.858Z","dependency_job_id":"6c286e06-9e38-400c-9924-1f635ff7f18f","html_url":"https://github.com/pmadruga/react-native-clean-project","commit_stats":{"total_commits":146,"total_committers":22,"mean_commits":6.636363636363637,"dds":0.7328767123287672,"last_synced_commit":"7e286fc635c8459e5be845087715c1cf666b8c2c"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmadruga%2Freact-native-clean-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmadruga%2Freact-native-clean-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmadruga%2Freact-native-clean-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmadruga%2Freact-native-clean-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmadruga","download_url":"https://codeload.github.com/pmadruga/react-native-clean-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254168126,"owners_count":22026090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","react-native","reactnative"],"created_at":"2024-09-24T20:31:38.544Z","updated_at":"2025-05-14T15:00:28.132Z","avatar_url":"https://github.com/pmadruga.png","language":"JavaScript","funding_links":["https://github.com/sponsors/pmadruga"],"categories":["JavaScript"],"sub_categories":[],"readme":"# React Native Clean Project\n\n[![npm version](https://badge.fury.io/js/react-native-clean-project.svg)](https://www.npmjs.com/package/react-native-clean-project) ![https://img.shields.io/github/license/pmadruga/react-native-clean-project.svg](https://img.shields.io/github/license/pmadruga/react-native-clean-project.svg)\n[![GitHub issues](https://img.shields.io/github/issues/pmadruga/react-native-clean-project.svg)](https://github.com/pmadruga/react-native-clean-project/issues)\n[![Build Status](https://travis-ci.org/pmadruga/react-native-clean-project.svg?branch=master)](https://travis-ci.org/pmadruga/react-native-clean-project)\n\nCleans your React Native project by purging caches and modules, and reinstalling them again.\n\n## Installing\n\n`yarn add -D react-native-clean-project`\n\n## Running\n\n### React-Native CLI plugin\n\nThis module is automatically detected as a plugin by the standard `react-native` command, adding new sub-commands:\n\n- `react-native clean-project-auto` - fully automated project state clean: like a freshly-cloned, never-started repo\n- `react-native clean-project` - interactive project state clean: choose types of react-native state to clean\n\n### Direct execution\n\nFor complete control (including using command-line arguments to non-interactively fine-tune what state is cleaned):\n\n`npx react-native-clean-project`\n\nOr add it as a script to your `package.json`\n\n```json\n\"scripts\": {\n  \"clean\": \"react-native-clean-project\"\n}\n```\n\n## Content\n\nThis is a combination of the commands suggested in the React Native documentation plus others.\n\n| State Type                | Command                           | In `clean-project-auto`? | Optional? | Default? | Option Flag                  |\n| ------------------------- | --------------------------------- | ------------------------ | --------- | -------- | ---------------------------- |\n| React-native cache        | `rm -rf $TMPDIR/react-*`          | Yes                      | No        | true     |                              |\n| Metro bundler cache       | `rm -rf $TMPDIR/metro-*`          | Yes                      | No        | true     |                              |\n| Watchman cache            | `watchman watch-del-all`          | Yes                      | No        | true     |                              |\n| NPM modules               | `rm -rf node_modules`             | Yes                      | Yes       | true     | --keep-node-modules          |\n| Yarn cache                | `yarn cache clean`                | Yes                      | Yes       | true     | --keep-node-modules          |\n| Yarn packages             | `yarn install`                    | No                       | Yes       | true     | --keep-node-modules          |\n| NPM cache                 | `npm cache verify`                | Yes                      | Yes       | true     | --keep-node-modules          |\n| NPM Install               | `npm ci`                          | Yes                      | Yes       | true     | --keep-node-modules          |\n| iOS build folder          | `rm -rf ios/build`                | Yes                      | Yes       | false    | --remove-iOS-build           |\n| iOS pods folder           | `rm -rf ios/Pods`                 | Yes                      | Yes       | false    | --remove-iOS-pods            |\n| system iOS pods cache     | `pod cache clean --all`           | Yes                      | Yes       | true     | --keep-system-iOS-pods-cache |\n| user iOS pods cache       | `rm -rf ~/.cocoapods`             | Yes                      | Yes       | true     | --keep-user-iOS-pods-cache   |\n| Android build folder      | `rm -rf android/build`            | Yes                      | Yes       | false    | --remove-android-build       |\n| Android clean project     | `(cd android \u0026\u0026 ./gradlew clean)` | Yes                      | Yes       | false    | --clean-android-project      |\n| Brew package              | `brew update \u0026\u0026 brew upgrade`     | No                       | Yes       | true     | --keep-brew                  |\n| Pod packages              | `pod update`                      | No                       | Yes       | true     | --keep-pods                  |\n\nExample: `npx react-native-clean-project --remove-iOS-build`\n\n## Other Tips\n\nYou can also reset the Metro bundler cache when starting with `react-native start --reset-cache`\n\n## Support \n\nThis library does not support windows. PR's are welcome.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\n- **Pedro Madruga** - [twitter](https://twitter.com/pmadruga_)\n\nSee also the list of [contributors](https://github.com/pmadruga/react-native-clean-project/graphs/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmadruga%2Freact-native-clean-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmadruga%2Freact-native-clean-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmadruga%2Freact-native-clean-project/lists"}