3

So, I have verdaccio hosted on my local machine. I have a few packages published on it as well with versions. What I want to do is, clear all of these packages with their versions. Like a reset to my verdaccio. I can unpublish the packages via npm unpublish command, but that would take me time since there are many versions. I am aware a similar question exists here Question, but it quite doesn't solve my problem.

To summarize, is there any way where I can remove all packages from my local verdaccio in one step (or maybe two steps) or any command? Basically a quicker way.

MuzaffarShaikh
  • 380
  • 3
  • 13

1 Answers1

5

I found a way. Actually this was not what I was looking for, but it solves the problem. So, I can just delete the packages which I do not want from the verdaccio storage directory. This directory can be found here:

C:\Users\username\AppData\Roaming\verdaccio\storage

It has sub directories of all the published packages. Just delete the ones which are not needed. I was actually looking for a more npm and verdaccio command specific way, but this seems to work fine.

MuzaffarShaikh
  • 380
  • 3
  • 13
  • 3
    On Mac, the default dir seems to be `~/.local/share/verdaccio/storage`. and I can confirm that deleting this directory will remove all Verdaccio packages – David Jun 23 '22 at 18:13