Opened 16 years ago

Closed 15 years ago

#18984 closed enhancement (fixed)

uninstall wildcard *

Reported by: cerieljacobs@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.8.0
Component: base Version: 1.8.0
Keywords: uninstall wildcard * Cc: raimue (Rainer Müller), jmroot (Joshua Root)
Port:

Description

With a port uninstall command, it would be nice if a wildcard could be specified, like:

port uninstall xorg-*

Which would uninstall all installed ports starting with xorg-

Change History (9)

comment:1 Changed 16 years ago by lperry (Perry Lee)

There is already a way to accomplish this, though not as obvious ;).

port uninstall installed and name:xorg-

comment:2 Changed 16 years ago by blb@…

Milestone: MacPorts 1.8.0MacPorts Future

comment:3 Changed 16 years ago by raimue (Rainer Müller)

Cc: raimue@… added

What kind of errors do you see when using port uninstall xorg-*?

comment:4 Changed 16 years ago by cerieljacobs@…

$ sudo /opt/local/bin/port uninstall xorg* Error: port uninstall failed: Registry error: xorg not registered as installed.

comment:5 Changed 16 years ago by cerieljacobs@…

$ sudo /opt/local/bin/port uninstall xorg*
Error: port uninstall failed: Registry error: xorg not registered as installed.

comment:6 Changed 16 years ago by jmroot (Joshua Root)

You probably just need to escape the asterisk so your shell doesn't eat it: sudo port uninstall xorg\*

comment:7 Changed 16 years ago by raimue (Rainer Müller)

I can confirm the issue, passing an uninstalled portname leads to this error message. port uninstall should silently ignore uninstalled ports. For now, use the workaround provided by perry above.

comment:8 Changed 15 years ago by jmroot (Joshua Root)

Component: portsbase

comment:9 Changed 15 years ago by jmroot (Joshua Root)

Cc: jmr@… added
Milestone: MacPorts FutureMacPorts 1.8.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.