Skip to content

Command to clear out node_modules directories #195

Closed

Description

@jamiebuilds

Something like lerna clean that just does rm -rf packages/*/node_modules

I find myself doing that every now and then because of npm sucking somehow.

Activity

  1. gigabo commented on Jun 8, 2016

    @gigabo
    Contributor

    Heh, we've got this in our package.json:

    $ grep nuke package.json
        "nuke": "rm -r node_modules; for d in packages/*/node_modules; do echo $d; rm -r $d; done"

    Mind if I take this?

  2. jamiebuilds commented on Jun 8, 2016

    @jamiebuilds
    ContributorAuthor

    Oh man I would love a lerna nuke command

    Mind if I take this?

    Yeah, go for it

  3. hzoo commented on Jun 8, 2016

    @hzoo
    Contributor

    Yeah I had to do that in babel today (rm -rf packages/*/node_modules, rm -rf node_modules) since I didn't see that babylon update caused tests to fail

  4. added a commit that references this issue on Jun 8, 2016
    0650de5
  5. added a commit that references this issue on Jun 9, 2016
    435461c
  6. maciej-gurban commented on May 1, 2018

    @maciej-gurban

    Is there a reason why lerna clean would not also remove root level node_modules?

  7. evocateur commented on May 1, 2018

    @evocateur
    Member

    Your root node_modules contains lerna itself and many other devDependencies. lerna clean was not designed to be a general replacement for rm, only convenience for removing any node_modules directories under package locations.

  8. lock commented on Dec 27, 2018

    @lock

    This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  9. locked as resolved and limited conversation to collaborators on Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions