<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-guide.
</pre>
<p><a href="https://github.com/macports/macports-guide/commit/b1010096e5c19e82b4767089d1f39979c21d756a">https://github.com/macports/macports-guide/commit/b1010096e5c19e82b4767089d1f39979c21d756a</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new b101009 Update uninstallation instructions
</span>b101009 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit b1010096e5c19e82b4767089d1f39979c21d756a
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Wed Dec 25 22:47:00 2019 -0600
<span style='display:block; white-space:pre;color:#404040;'> Update uninstallation instructions
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/59889
</span>---
guide/xml/installing.xml | 128 ++++++++++++++++++++++++++++-------------------
1 file changed, 76 insertions(+), 52 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/guide/xml/installing.xml b/guide/xml/installing.xml
</span><span style='display:block; white-space:pre;color:#808080;'>index 9473825..f3fc9c7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/guide/xml/installing.xml
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/guide/xml/installing.xml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -350,7 +350,7 @@
</span> </section>
<section xml:id="installing.macports.upgrade">
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <title>MacPorts Upgrade</title>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <title>Upgrade MacPorts</title>
</span>
<para>MacPorts base upgrades are performed automatically (when a newer release is available) during a <link
linkend="using.port.selfupdate">selfupdate</link> operation. To upgrade a copy of MacPorts that was
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -360,57 +360,81 @@
</span> </section>
<section xml:id="installing.macports.uninstalling">
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <title>Uninstall</title>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>Uninstalling MacPorts can be a drastic step, and depending on the issue you are experiencing, you may not
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- need to do so. If you are unsure, ask on the <link
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xlink:href="https://lists.macports.org/mailman/listinfo/macports-users">macports-users</link> mailing list
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- first.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>If you need to uninstall MacPorts, and <command>port</command> is functioning, first
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uninstall all the installed ports by running this command in the Terminal:</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting><prompt>$</prompt> <userinput>sudo port -fp uninstall installed</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>All that will be left in your installation prefix now will be files that were not registered to any port.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This includes configuration files, databases, any files which MacPorts renamed in order to allow a forced
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- installation or upgrade, and the base MacPorts software itself. You may wish to save your configuration
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- files (most are in <filename>$prefix/etc</filename>), databases, or any other unique data by moving it
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- aside.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>To remove all remaining traces of MacPorts, run the following command in the Terminal. If you have changed
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <varname>prefix</varname>, <varname>applications_dir</varname> or <varname>frameworks_dir</varname> from
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- their default values, then replace <filename>/opt/local</filename> with your <varname>prefix</varname>,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- replace <filename>/Applications/MacPorts</filename> with your <varname>applications_dir</varname>, and/or
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- add your <varname>frameworks_dir</varname> to the list, respectively.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting><prompt>$</prompt> <userinput>sudo rm -rf \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /opt/local \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Applications/DarwinPorts \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Applications/MacPorts \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/LaunchDaemons/org.macports.* \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/Receipts/DarwinPorts*.pkg \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/Receipts/MacPorts*.pkg \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/StartupItems/DarwinPortsStartup \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/Tcl/darwinports1.0 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /Library/Tcl/macports1.0 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ~/.macports</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>If you use a shell other than bash (perhaps tcsh), you may need to adjust the above to fit your shell's
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- syntax. Also note that depending on which version of MacPorts you have and which ports you have installed,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- not all of the above paths will exist on your system. This is OK.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>MacPorts also creates at least one user for privilege separation. Leaving it in existence will almost
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- always do no harm, but if you really need to remove it, you can use these commands from an account with
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- admin privileges:</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting><prompt>$</prompt> <userinput>dscl -p . -delete /Users/macports</userinput>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-<prompt>$</prompt> <userinput>dscl -p . -delete /Groups/macports</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>If you configured MacPorts to use a different username, then of course you should specify it
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- instead of <filename>macports</filename>. Individual ports may create users as well; you can remove them
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- with the same commands, but replacing <filename>macports</filename> with the username you wish to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <title>Uninstall MacPorts</title>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Uninstalling MacPorts is a drastic step and, depending on the issue you are experiencing, you may not need
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to do so. If you are unsure, ask on the <link
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xlink:href="https://lists.macports.org/mailman/listinfo/macports-users">macports-users</link> mailing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list first. If you are sure you want to uninstall, read on.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <section xml:id="installing.macports.uninstalling.ports">
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <title>Uninstall All Ports</title>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If you want to uninstall MacPorts and the <command>port</command> command is functioning, first
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uninstall all the installed ports by running this command in the Terminal:</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting><prompt>$</prompt> <userinput>sudo port -fp uninstall installed</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>All that will be left in your installation prefix now will be files that were not registered to any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port. This includes configuration files, databases, any files which MacPorts renamed in order to allow a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ forced installation or upgrade, and the base MacPorts software itself. You may wish to save your
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configuration files (most are in <filename>$prefix/etc</filename>), databases, or any other unique data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ by moving it aside.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If the <command>port</command> command is not functioning, you can proceed on to the next steps, but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if you had installed any ports that install files to nonstandard locations, those files might not be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ removed.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </section>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <section xml:id="installing.macports.uninstalling.users">
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <title>Remove Users and Groups</title>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>When MacPorts is installed, a <filename>macports</filename> macOS user and group are created for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ privilege separation. If you want to remove them, you can use these commands from an account that has
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ admin privileges:</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting><prompt>$</prompt> <userinput>dscl -p . -delete /Users/macports</userinput>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --><prompt>$</prompt> <userinput>dscl -p . -delete /Groups/macports</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If you configured MacPorts to use a different user or group name, then specify that instead of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>macports</filename>.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Individual ports may create users and groups as well; you can remove them with the same commands, but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ replacing <filename>macports</filename> with the user or group name you wish to delete.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </section>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <section xml:id="installing.macports.uninstalling.everything">
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <title>Remove the Rest of MacPorts</title>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If you want to remove all remaining traces of MacPorts, run the following command in the Terminal. If
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ you have changed <varname>prefix</varname>, <varname>applications_dir</varname> or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <varname>frameworks_dir</varname> from their default values, then replace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>/opt/local</filename> with your <varname>prefix</varname>, replace
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>/Applications/MacPorts</filename> with your <varname>applications_dir</varname>, and/or add
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ your <varname>frameworks_dir</varname> to the list, respectively.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If you are running macOS 10.15 Catalina or later and have not disabled System Integrity Protection
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (SIP), you will need to <link linkend="installing.macports.uninstalling.users">remove the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>macports</filename> user</link> first.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting><prompt>$</prompt> <userinput>sudo rm -rf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /opt/local \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Applications/DarwinPorts \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Applications/MacPorts \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/LaunchDaemons/org.macports.* \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/Receipts/DarwinPorts*.pkg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/Receipts/MacPorts*.pkg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/StartupItems/DarwinPortsStartup \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/Tcl/darwinports1.0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> /Library/Tcl/macports1.0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<!-- --> ~/.macports</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If you use a shell other than bash (perhaps tcsh), you may need to adjust the above to fit your
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shell's syntax.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Depending on which version of MacPorts you have and which ports you have installed, not all of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ above paths will exist on your system; this is OK.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </section>
</span> </section>
<section xml:id="installing.shell">
</pre><pre style='margin:0'>
</pre>