2

I installed bit on my Ubuntu 22.04 machine using npx @teambit/bvm install, which created an executable in my HOME/bin folder and an entry on my .zshrc

Now, I would like to know if anything else was installed, and how can I completely remove Bit from my machine.

Ideally, I would like to know which code was run when doing npx @teambit/bvm install

I use volta to install nodejs https://volta.sh/

nicoramirezdev
  • 466
  • 3
  • 14
  • bvm installs bit in your user home directory, inside `~/.bvm`. just delete that dir. – itaymendel Jan 22 '23 at 17:24
  • That seems part of the puzzle. I found an executable file on `~/bin/bvm`. That raise a bit of paranoid questions :D – nicoramirezdev Jan 25 '23 at 10:01
  • 1
    the `~/bin/bvm` is something that package-manager put, unrelated to bvm or bit. there's no way to get npx magically undo what any tool did, as npx doesn't force any boundaries. bvm creates its own set of "side effects" like installing bit in the `~/.bvm/` folder, which npx knows nothing about. at the end of the day, you need to delete each tool per to its own instructions. for bit's it's just removing `~/.bvm`. anything more is just what npx created, which bvm/bit doesn't control. – itaymendel Jan 25 '23 at 18:16
  • I get that yes, makes sense. I was wondering, where can one find the source code of tools that are installed via `npx` ? It would be nice to see the **bvm and bit side effects** that you mention, apart from the package manager. That would make what you are explaining more than sensical: factual. – nicoramirezdev Jan 29 '23 at 06:21
  • source code of packages can be found in various areas. sometimes on github, sometimes on other sources. it's also possible that the source is not out in the open or a repository has been removed, but npm package is still there. for bvm, you can find source code here - https://github.com/teambit/bvm . – itaymendel Feb 03 '23 at 15:33
  • That sounds like a god answer for this question :) can you add it as an aswer? I would accept it – nicoramirezdev Feb 14 '23 at 15:50

1 Answers1

1

Answering this question requires some context.

First and foremost, @teambit/bvm produces side-effects in the ~/.bvm/ directory (see code here - https://github.com/teambit/bvm). To delete Bit and BVM completely, you need to manually remove that directory.

In general, npx doesn't have a way to revert side effects by packages/commands you run through it (if they do produce any side effects). There's no way to get npx to undo what any tool did, as npx doesn't force any boundaries on tools.
At the end of the day, you need to delete each tool per to its own instructions.

The only thing that npx does is creating the ~/bin/bvm (in the case of @teambit/bvm, for other tools naming will be different). This is a shortcut for the command that the package-manager puts in place. It's unrelated to bvm or bit. npx may also place things in global node_modules or do other npm-related things.

itaymendel
  • 694
  • 7
  • 20