'\" t .TH "PORT\-SELFUPDATE" "1" "2\&.10\&.99" "MacPorts 2\&.10\&.99" "MacPorts Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" port-selfupdate \- Upgrade MacPorts itself and update the port definition files\&. .SH "SYNOPSIS" .sp .nf \fBport\fR [\fB\-qvdf\fR] \fBselfupdate\fR [\-\-no\-sync] [\-\-migrate] [\-\-rsync] .fi .SH "DESCRIPTION" .sp \fBport selfupdate\fR checks for new releases of MacPorts and upgrades it when necessary\&. \fBselfupdate\fR also updates the local port definitions (the so\-called ports tree) to the latest state so you have the latest versions of ports available\&. This part of the operation corresponds to \fBport-sync\fR(1)\&. .sp You should regularly run \fBselfupdate\fR to update your local port definitions\&. Running \fBselfupdate\fR is required to get updated software with bug fixes and new features\&. .SH "OPTIONS" .PP \fB\-\-no\-sync\fR .RS 4 Only check for updates \- and install if available \- for MacPorts itself\&. Do not update the ports tree\&. .RE .PP \fB\-\-migrate\fR .RS 4 Rebuild even if no new version is available, upgrade if a new version is available\&. Contrary to \fB\-f\fR, this flag will prevent downgrades\&. This flag is useful when upgrading to a newer macOS major version\&. .RE .PP \fB\-\-rsync\fR .RS 4 Use the older rsync method for downloading the new version of MacPorts\&. The default is to try HTTP(S) first, and use rsync only if that fails\&. .RE .SH "GLOBAL OPTIONS" .sp Please see the section \fBGLOBAL OPTIONS\fR in the \fBport\fR(1) man page for a description of global port options\&. .PP \fB\-q\fR .RS 4 Suppress status output, be as silent as possible\&. .RE .PP \fB\-f\fR .RS 4 Do not check whether the downloaded MacPorts version is newer than the currently installed one, but always rebuild and reinstall MacPorts\&. You can use this to downgrade from a beta or development version to the latest release\&. Note that there is no guarantee that no incompatible and irreversible changes have been made to MacPorts\*(Aq internal data structures, which can make downgrading impossible\&. .RE .SH "EXAMPLES" .sp When no new versions are available, \fBselfupdate\fR looks like this: .sp .if n \{\ .RS 4 .\} .nf $ sudo port selfupdate \-\-\-> Checking for newer releases of MacPorts MacPorts base version 2\&.10\&.99 installed, MacPorts base version 2\&.10\&.99 available\&. \-\-\-> MacPorts base is already the latest version \-\-\-> Updating the ports tree .fi .if n \{\ .RE .\} .sp If \fBselfupdate\fR detects that a newer version of MacPorts is available, it attempts to update your copy to this version\&. In that case, the output will be different: .sp .if n \{\ .RS 4 .\} .nf $ sudo port selfupdate \-\-\-> Checking for newer releases of MacPorts MacPorts base version 2\&.6\&.0 installed, MacPorts base version 2\&.10\&.99 available\&. \-\-\-> MacPorts base is outdated, installing new version 2\&.10\&.99 \-\-\-> Updating the ports tree \-\-\-> Attempting to fetch MacPorts 2\&.10\&.99 source code from https://github\&.com/macports/macports\-base/releases/download/v2\&.10\&.99/MacPorts\-2\&.10\&.99\&.tar\&.bz2 \-\-\-> Extracting MacPorts 2\&.10\&.99 \-\-\-> Installing new MacPorts release in /opt/local as root:admin; permissions 0755 .fi .if n \{\ .RE .\} .SH "TROUBLESHOOTING" .sp If \fBselfupdate\fR fails, it usually does so in one of two places: The network connection, or the installation of the update\&. .PP Network Problems .RS 4 MacPorts uses the \fIrsync\fR protocol to update its ports tree to the latest version\&. This will fail if you are on a network that blocks TCP connections to the rsync port 873\&. Talk to your network administrators and ask them to allow connections to port 873 if this happens to you\&. Alternatively, you can just download a new installer \&.pkg from macports\&.org and run that to upgrade your installation\&. .sp Network connection problems might also affect you if you are in a country with US export restrictions\&. We suggest using one of our other \m[blue]\fBmirrors\fR\m[]\&\s-2\u[1]\d\s+2 outside of the US in these cases\&. .RE .PP Compilation Problems .RS 4 When a problem occurs while building and installing the new MacPorts version, you will see the message .sp .if n \{\ .RS 4 .\} .nf Error installing new MacPorts base: command execution failed .fi .if n \{\ .RE .\} .sp To find out what went wrong, re\-run \fBselfupdate\fR with the \fB\-d\fR flag\&. This will allow you to see all output generated by the build system\&. Look for the first occurrence of \(lqerror\(rq\&. If you cannot figure out what\(cqs wrong on your own, feel free to ask on \m[blue]\fBthe macports\-users mailing list\fR\m[]\&\s-2\u[2]\d\s+2 and attach the output generated by .sp .if n \{\ .RS 4 .\} .nf $ sudo port \-d selfupdate .fi .if n \{\ .RE .\} .RE .SH "SEE ALSO" .sp \fBport\fR(1), \fBport-sync\fR(1) .SH "AUTHORS" .sp .if n \{\ .RS 4 .\} .nf (C) 2014\-2020 The MacPorts Project Clemens Lang .fi .if n \{\ .RE .\} .SH "EXTERNAL REFERENCES" .IP " 1." 4 mirrors .RS 4 \%https://trac.macports.org/wiki/Mirrors#MacPortsSource .RE .IP " 2." 4 the macports-users mailing list .RS 4 \%mailto:macports-users@lists.macports.org .RE