<- Back

User Guide

Swift Community Apt Repository

Supported Distributions

The Swift Community Apt Repository currently supports the following Distributions and architectures.
  Debian / Raspberry Pi OS- armv7/arm64/amd64
    - buster / 10
    - bullseye / 11
    - bookworm / 12
  Raspbian - armv7/arm64/armv6/7
    - bullseye
    - buster
  Ubuntu - arm64/amd64
    - bionic / 18.04
    - focal / 20.04
    - jammy / 22.04
    - kinetic / 22.10
    - lunar / 23.04
The repository also supports distributions that are based on the above list.
This includes many popular Linux distributions such as the following -
    Linux Mint
    Pop!_OS
    Zorin OS
    Deepin
    Kubuntu
    Lubuntu

Installation

The Quick Install Script
The easiest way to get up and running with the Swift Community Apt Repository is to use the Quick Install Script.
  'curl -s https://archive.swiftlang.xyz/install.sh | sudo bash'
Step 1 - System Update and Install curl
First run a system update and upgrade.
  sudo apt update && sudo apt upgrade
Then install curl.
  sudo apt install curl
Step 2 - Run the quick install script
  curl -s https://archive.swiftlang.xyz/install.sh | sudo bash
The installer script will automatically detect whether your system is compatible with the repository.
Step 3 - Choose which version of Swift to install
If your system is compatible you will be presented with a menu which will allow you to choose which version of swift is installed.
  1) (main) latest - This will update to the latest release of Swift available
  2) (v5_4) Swift version 5.4.* - this will update to the latest point release of Swift 5.4
  3) (v5_5) Swift version 5.5.* - this will update to the latest point release of Swift 5.5
  4) (v5_6) Swift version 5.6.* - this will update to the latest point release of Swift 5.6
  5) (v5_7) Swift version 5.7.* - this will update to the latest point release of Swift 5.7
NOTE 1: The number of different versions of swift available will differ depending on the distribution/version.
NOTE 2: If installing on Armv7/Armhf installs of Debian / Raspberry Pi OS the only swift versions available at the moment are swift-5.1.5 and swift-5.7.*
NOTE 3: The Armv7/Armhf swift-5.7.* version for Debian / Raspberry Pi OS is still under development and may not be suitable for production
Step 4 - Install Swift
  sudo apt install swiftlang
Step 5 - Check Swift version
  swift --version
Manual Installation
Step 1 - System Update and Install dependencies
First run a system update and upgrade.
  sudo apt update && sudo apt upgrade
Then install dependencies.
  sudo apt install curl ca-certificates gnupg
Step 2 - Add repository security key
  curl -fsSL https://archive.swiftlang.xyz/swiftlang_repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/swiftlang_repo.gpg.key
Step 3 - Add repository sources list to /etc/apt/sources.list.d/ directory
NOTE: The the following command is on one line
  echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/swiftlang_repo.gpg.key] https://archive.swiftlang.xyz/[DIST] [RELEASE] [REPO]" | sudo tee /etc/apt/sources.list.d/swiftlang.list > /dev/null
# Change [DIST], [RELEASE] and [REPO] to suit your installation
# [DIST] = (ubuntu or debian)
# [RELEASE] =( buster or bullseye for debian) (bionic, focal, hirsute, impish or jammy for ubuntu)
# [REPO] = (main, dev, etc.) see documentation for details of repository sections available.
# example for ubuntu focal main repository.
  echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/swiftlang_repo.gpg.key] https://archive.swiftlang.xyz/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/swiftlang.list > /dev/null
Step 4 - Run update and install Swift
  sudo apt update
  sudo apt install swiftlang

Browsing the Repository Files

You can directly browse the repository files at the following address -

Viewing the Repository Install Script Code

If you would like to view the contents of the 'install.sh' script before running it.
The full code is available here -

Getting Help

If you need help or have an issue with the repository, please contact me via the Swift Forums.

Support This Repository

This repository and supporting web services are all maintained and financed by myself. Any support that you can give will be greatly appreciated.