mty
mty

Reputation: 800

Uninstalling multiple ports with the same prefix in Macports

I have installed a lot of Haskell related packages through MacPorts but due to problems related to update of some of those packages, I decided to move away Haskell package management from MacPorts.

I have 34 ports installed that start with the name hs- (like hs-random or hs-primitive) and I am trying to uninstall all those with a single command.

So far, I tried sudo port uninstall hs-* and sudo port uninstall "hs-*" but not success. Is there a solution to this problem?

Upvotes: 0

Views: 175

Answers (2)

Jeremy Huddleston Sequoia
Jeremy Huddleston Sequoia

Reputation: 23651

sudo port -v uninstall "hs-*"

That works for me; I'm on trunk base.

Upvotes: 1

mty
mty

Reputation: 800

I finally solved it with port installed | grep "hs-*" | xargs sudo port uninstall

Upvotes: 0

Related Questions