Opened 4 years ago

Last modified 4 years ago

#62280 closed defect

uninstall MacPorts guide needs updating for zsh? zsh: no matches found: /Library/Receipts/DarwinPorts*.pkg — at Version 1

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: guide Version:
Keywords: Cc:
Port:

Description (last modified by kencu (Ken))

https://guide.macports.org/chunked/installing.macports.uninstalling.html

After migrating a macOS install from Catalina to BigSur, all the ports came with it.

It is not possible to actually run "port" on the new system to uninstall the ports due to:

% port -v
Error: Current platform "darwin 20" does not match expected platform "darwin 19"
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
OS platform mismatch
    while executing
"mportinit ui_options global_options global_variations"

So just had to blow them all out with:

% sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports

but this gives errors trying to run it on BigSur:

zsh: no matches found: /Library/Receipts/DarwinPorts*.pkg

and then

zsh: no matches found: /Library/Receipts/MacPorts*.pkg

not sure if there is a way to make zsh silently ignore the "no matches".

I edited the line manually and then the command ran through and deleted everything.

% sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/StartupItems/DarwinPortsStartup \ 
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports

Change History (1)

comment:1 Changed 4 years ago by kencu (Ken)

Description: modified (diff)
Note: See TracTickets for help on using tickets.