New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #18984 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

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@…, jmr@…
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

comment:1 Changed 4 years ago by perry@…

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

port uninstall installed and name:xorg-

comment:2 Changed 4 years ago by blb@…

  • Milestone changed from MacPorts 1.8.0 to MacPorts Future

comment:3 Changed 4 years ago by raimue@…

  • Cc raimue@… added

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

comment:4 Changed 4 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 4 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 4 years ago by jmr@…

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

comment:7 Changed 4 years ago by raimue@…

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 4 years ago by jmr@…

  • Component changed from ports to base

comment:9 Changed 4 years ago by jmr@…

  • Cc jmr@… added
  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from MacPorts Future to MacPorts 1.8.0
Note: See TracTickets for help on using tickets.