Do I have to manually uninstall all dependent gems?

前端 未结 9 2195
名媛妹妹
名媛妹妹 2020-12-08 06:50

I tried to uninstall datamapper using the command gem uninstall dm-core.

But it seems that a whole bunch of dependent gems also need to be uninstalled.

9条回答
  •  余生分开走
    2020-12-08 07:11

    If you would like to use some wild cards to remove some gems (e.g. to remove some gems from a specific vendor) then you can pipe the output from gem list to grep as shown below

    gem list --no-version | grep "opener-" | cut -d " " -f1  | xargs gem uninstall -aIx
    

    The above command removes all the gems whose name begins with "opener-"

提交回复
热议问题