October 9, 2025
Tutorials

Install Go on Debian 13 (Trixie) — Step-by-Step Guide

Install Go on Debian 13

Go, popularly known as Golang, is a robust and flexible programming language that has quickly gained traction with developers. To make software development safe, fast, and approachable for getting reliable and efficient software. It’s a good choice to install on Ubuntu 13 Trixie because of its slim goroutines. They support concurrent programming, hence are best suitable for programs/applications (such as memory management and performance).

Due to its importance, this blog post will detail all the possible methods of installing Go (Golang) on Debian 13 Trixie.

Table of Contents

How To Install Go (Golang) on Debian 13 Trixie?

Go is designed for speed and efficiency. It compiles quickly and executes code with minimal overhead, making it suitable for various applications. Let’s explore the different ways to install Go (Golang) on Debian 13 Trixie.

Here starts the installation of Go on Debian 13 Trixie with the first method.

Method 1: Using Default Repository Package

Go allows programmers/developers to write concurrent and efficient programs. It is available in the default Debian 13 Trixie repository. Track these steps for installation:

Step 1: Update Debian Packages

Before installing Golang, ensure your system is upgraded/up-to-date:

sudo apt update

sudo apt update

Step 2: Find the Golang Package

Now, search the Golang package details, including the version, via the “apt show” utility:

sudo apt show golang

sudo apt show golang

Step 3: Install Golang

The easiest method is to use the default repository package. Now, install Golang from the default repository using apt:

sudo apt install golang

sudo apt install golang

Step 4: Verify GO Installation

Users can check the successful installation of Go via the “version” utility as below:

go version

go version

Optional: Remove/Uninstall Go

Users can uninstall/remove Go from the Debian system by executing the following command:

sudo apt remove golang # Remove Go Package Only
sudo apt purge golang # Remove Go Package as well as Dependencies
sudo apt autoremove golang # Completely Remove Go

sudo apt autoremove golang

That is all from the first method. Let’s move towards another method.

Method 2: Using the Official Website

Go is well-suited for building scalable systems. Its standard library makes it an ideal option for cloud-native applications. Users download the installation package directly from the official Go website. To install Go (Golang) on Debian 13 Trixie, follow these steps:

Step 1: Update Debian

Before installing Go, ensure your system is up-to-date. For this, run the following commands:

sudo apt update
sudo apt upgrade

Step 2: Download Golang

Visit the official Go website to download the latest version. At this time, the latest version is 1.22.0. Once you’ve identified the appropriate version for Linux, copy the URL of the corresponding download link:

wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz

wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz

Note: Users prefer the (available) latest version during download from the official website.

Step 3: Extract the tar Package

Extract the downloaded (.tar.gz) archive and copy its contents into /usr/local. This is for creating a Go tree (fresh):

sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz

sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz

Step 4: Set Up Golang (PATH)

After installation, add Go’s (binary) directory to the PATH (environment variable). For instance, add the below line to the $HOME/.profile or /etc/profile:

export PATH=$PATH:/usr/local/go/bin

export PATH=$PATH:/usr/local/go/bin

Optional: For applying the changes instantly, users can execute the following shell command:

source $HOME/.profile

Step 5: Verify Installation

Finally, users can check the Go version by executing the following command:

go version

go version

In this way, Go has been installed on Debian.

Method 3: Using Snap

Go’s syntax is straightforward to learn. It emphasizes readability, which reduces the cognitive load for developers. Snapcraft is a Linux application store that contains various Linux snaps. To install Go using Snapcraft, follow these steps:

Step 1: Install Snap

First, install the snapd (package manager), which is utilized for managing Linux application snaps:

sudo apt install snapd

sudo apt install snapd

Step 2: Download and Install Golang Snap

Next, download and install the Go snap using the following command. The Go programming language snap is successfully installed with the “1.22.0” version:

sudo snap install go –classic

sudo snap install go --classic

Step 3: Verify GO Installation

To verify that Go is installed, display the installed version via the “snap list” utility. Now, you have to go install on your Debian 13 Trixie system:

snap list

snap list

Optional: Remove Go

If you ever need to remove Go, remove Go using snapd by executing the following command:

sudo snap remove go

sudo snap remove go

That is all from the guide.

Conclusion

To install Go (Golang) on Debian 13 Trixie, use the default repository package via the “sudo apt install golang” command. Or, download as well as install the (recent-release) latest version of Go from the official website. Alternatively, use Snapcraft to install Go. Installing Go provides access to a powerful language that simplifies software development, supports concurrency, and offers scalability for modern applications. However, I recommend the default repository package for simplicity. This guide has explained possible methods to install Go (Golang) on Debian 13 Trixie.

    Leave feedback about this

    • Quality
    • Price
    • Service

    PROS

    +
    Add Field

    CONS

    +
    Add Field
    Choose Image
    Choose Video