If you installed Swift from the official website, download the new version, extract it, and move it to /usr/local/swift, replacing the old version. Update your PATH if necessary. If you used a package manager, update the package list and upgrade: sudo apt-get update sudo apt-get upgrade swift