> On Aug 20, 2018, at 10:17 AM, Christopher Jones <jon...@hep.phy.cam.ac.uk> > wrote: > >> On 20 Aug 2018, at 4:03 pm, Lee Bast <x-li...@asgarda.com> wrote: >> >>> On Aug 20, 2018, at 1045 , William Parducci <b...@parducci.net> wrote: >>> >>> For future reference NEVER issue sudo rm -rf in a multiline command. It is >>> just asking for stuff like this to happen. >> The guide (and a lot of MacPorts in general I guess) is more aimed at >> devs and power users so it kind of assumes everyone is comfortable with the >> CLI and knows basic footguns, but looking at that page it might be a >> reasonable idea to not just tell people to run a copy-pasted multiline sudo >> rm -rf command. It's a dangerous enough thing and it's a low bar to not say >> "copy and run this" and change it to "here are a list of MacPorts' file and >> directory locations, delete them for a full manual removal", then leave it >> to users. > > Whilst I have myself pointed people at that page myself in the past, perhaps > a case could be made that having a public web page with instructions that > start with “sudo rm -rf “ is perhaps not the best idea. If the user copies > the command badly, and doesn’t appreciate how powerful it can be, they could > (and it seems have) run into problems. > > Perhaps we should not have that command explicitly written there. Better yet > perhaps and official ‘uninstaller’ that does the equivalent in a control > manner would be better.
Another option for consideration is to put in a disclaimer along the lines of “DO NOT ATTEMPT UNLESS YOU UNDERSTAND WHAT THIS DOES AND THE RISKS INVOLVED.” on pages that have OS command line executables and/or recompose the commands to individual lines so as to—in theory—make them less prone to misapplication: $ sudo rm -rf /opt/local $ sudo rm -rf /Applications/DarwinPorts $ sudo rm -rf /Applications/MacPorts $ sudo rm -rf /Library/LaunchDaemons/org.macports.* $ sudo rm -rf /Library/Receipts/DarwinPorts*.pkg $ sudo rm -rf /Library/Receipts/MacPorts*.pkg $ sudo rm -rf /Library/StartupItems/DarwinPortsStartup $ sudo rm -rf /Library/Tcl/darwinports1.0 $ sudo rm -rf /Library/Tcl/macports1.0 $ sudo rm -rf ~/.macports b