Packages / golang / Ubuntu 24.04
Install guide · Ubuntu 24.04 (noble)printed 28 Oct 2026, 07:20 UTC
Install Go 1.27 on Ubuntu 24.04
Ubuntu 24.04 ships Go 1.22. The current release is 1.27.3. freshdeb builds it for noble from upstream's release with Debian's packaging, so it replaces the distribution's package in place and updates with apt upgrade like the rest of the system.
- Ubuntu 24.04 ships
- 1.222:1.22~2build1
- v1.27
- 1.27.3stays on 1.27.x, patch releases only. Currently 1.27.3, upstream support until Aug 2027.
- v1.26
- 1.26.10stays on 1.26.x, patch releases only. Currently 1.26.10, upstream support until Feb 2027.
- Built for
- amd64 and arm64, natively
Not published yet. The first golang release is being built. These commands work once it lands; the version shown is the one it will publish.
1Trust the signing key (once per machine)
sudo install -d -m 0755 /etc/apt/keyrings curl -fsSL https://deb.freshdeb.com/freshdeb-archive-keyring.gpg \ | sudo tee /etc/apt/keyrings/freshdeb-archive-keyring.gpg >/dev/null
Fingerprint 3BBD F03A 9C0B F890 F8CA 9510 7595 CC55 468F 3161. How to verify.
2Add the source for noble
sudo tee /etc/apt/sources.list.d/freshdeb-golang.sources >/dev/null <<EOF Types: deb URIs: https://deb.freshdeb.com/golang Suites: noble Components: latest Signed-By: /etc/apt/keyrings/freshdeb-archive-keyring.gpg EOF
latest mirrors v1.27, currently 1.27.3, and moves when a newer line takes over. Other components: v1.27, v1.26, listed with the versions.
3Install
sudo apt update && sudo apt install golang-go
apt policy golang-go # expect 2:1.27.3-1+freshdeb~ubuntu24.04Already on Ubuntu 24.04's Go? The same command upgrades it: the freshdeb version sorts higher. What's different from Debian's package.
Upgrading from Go 1.22
Configuration and data stay where Debian put them.
- Also
golang-gomakes this Go/usr/bin/go. The distribution's versioned Go packages (golang-1.24-goand the like) stay installed untilapt autoremove, and code that built with them builds with this Go: Go 1 programs stay compatible.
Going back to 1.22
Delete /etc/apt/sources.list.d/freshdeb-golang.sources, run sudo apt update, then sudo apt install golang-go=2:1.22~2build1: apt asks before it downgrades. Name the other golang packages you installed with their Ubuntu 24.04 version too.
Why a package
The tarball from go.dev in /usr/local/go is the same Go, but it needs PATH set and updating by hand. As a package, /usr/bin/go is this Go and apt upgrade brings its security releases. Each supported minor is its own line, so v1.26 stays on 1.26.