DebianDebian Based

How To Install Lazygit on Debian 13

Install Lazygit on Debian 13

If you spend any real time working with Git in the terminal, you already know the friction: staging files one by one, typing out rebase commands, hunting through commit history with git log --oneline. It adds up fast. Lazygit is a terminal UI for Git that cuts that friction down to almost nothing, and learning how to install Lazygit on Debian 13 takes less than five minutes once you know the right path.

Debian 13, codenamed Trixie, was officially released on August 9, 2025. For the first time in Debian’s history, Lazygit ships in the official stable repository, which means the installation story on Debian 13 is cleaner than it has ever been on any prior Debian release. You can install it with a single apt command, or choose one of two alternative methods if you need a newer version or want to build from source.

This guide covers all three methods in full detail. Whether you are a developer setting up a local workstation, a sysadmin configuring a Linux server, or someone who just upgraded to Trixie and wants to sharpen their Git workflow, this article gives you everything you need to go from zero to a working Lazygit setup. By the end, you will also know how to launch it, navigate the TUI, configure a shell alias, and fix the most common errors that come up in the wild.

What Is Lazygit and Why Should You Install It on Debian 13?

Lazygit is an open-source, keyboard-driven terminal UI for Git commands, written in Go by Jesse Duffield. The project launched in 2018 and has grown into one of the most widely used Git tools in the Linux developer ecosystem, with active monthly releases as of 2025.

The core idea is simple. Instead of memorizing and typing commands like git rebase -i HEAD~3 or git add -p, you interact with a five-panel TUI where every common Git operation maps to a single keystroke or a short key combination. Staging a file takes one press of Space. Pushing to a remote takes p. Interactive rebasing happens visually without editing a TODO file.

Here is a quick look at what Lazygit gives you out of the box:

  • Visual file staging: Stage individual lines or hunks, not just full files
  • Interactive rebasing: Squash, fixup, drop, and reorder commits in a panel view
  • Cherry-picking: Copy commits across branches with Shift+C and Shift+V
  • Branch management: Create, checkout, delete, rename, and merge branches from one screen
  • Git bisect UI: Mark commits as good or bad to track down regressions visually
  • Worktrees support: Work on multiple branches at the same time without stashing
  • Log and diff browsing: Scroll through commit history and diffs with PgUp/PgDn
  • Push and pull: Interact with remotes without ever leaving the interface
  • Custom commands: Define project-specific Git workflows inside the config file

The latest upstream release as of early 2026 is v0.55.1. Debian 13 Trixie packages version 0.50.0+ds1-1 in its stable repository, which covers the full feature set most developers use daily. If you need cutting-edge features from 0.55.x or later, Method 2 (GitHub binary install) covered below will get you there.

Prerequisites

Before you run a single command, confirm your environment matches the following requirements. Skipping this step is the most common reason the installation fails.

System requirements:

  • Debian 13 (Trixie) installed and running, either on bare metal, a VM, or a VPS
  • A non-root user account with sudo privileges
  • Internet access from the machine you are configuring

Tools that must be present:

  • Git: Lazygit is a frontend for Git, not a replacement. It calls Git binaries under the hood. Install it first if you have not already:
    sudo apt install git

    Verify with:

    git --version
  • curl: Required for Method 2 (GitHub binary install). Install it with:
    sudo apt install curl
  • Go 1.21 or later: Required only for Method 3 (source build). Skip this if you plan to use Method 1 or 2.

Confirm your Debian version before proceeding:

cat /etc/os-release

You should see VERSION_ID="13" and VERSION_CODENAME="trixie" in the output. If you see bookworm or an older codename, the APT method below will not find the Lazygit package in the default repositories.

Step 1: Update Your System Before Installation

Always update your package index before installing anything on a Debian system. This syncs your local package list with Debian’s mirrors and ensures you pull the latest available version of any package.

sudo apt update && sudo apt upgrade -y

The apt update command refreshes the package metadata. The apt upgrade -y command applies any pending system updates. Running both together is good hygiene, especially on a fresh Debian 13 install, and prevents version conflicts between newly installed packages and outdated system libraries.

Expected output will end with something like:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
X packages can be upgraded.

Once the update finishes, you are ready to install Lazygit.

Step 2: Install Lazygit on Debian 13 via APT (Recommended)

This is the fastest and cleanest method for the Lazygit on Debian 13 setup. Because Lazygit 0.50.0 is now included in Debian 13 Trixie’s main repository, you do not need to add any PPA, third-party source, or GPG key. The package manager handles everything.

Install Lazygit with a Single Command

sudo apt install lazygit

Debian’s APT resolver will pull in any required dependencies automatically. The installation typically completes in under 30 seconds on a standard internet connection.

Verify the Installation

Run the following to confirm Lazygit is installed and accessible from your PATH:

lazygit --version

Expected output:

commit=, build date=, build source=packagecloud, version=0.50.0, os=linux, arch=amd64, git version=2.47.2

Also confirm the binary location:

which lazygit

Expected output: /usr/bin/lazygit

What APT Gives You That Other Methods Do Not

Packages installed via APT are fully managed by Debian’s package system. That means:

  • Security updates arrive automatically via sudo apt upgrade
  • Clean removal is one command: sudo apt remove lazygit
  • The package is available for eight CPU architectures: amd64, arm64, armel, armhf, i386, ppc64el, riscv64, and s390x

If you are on a production Linux server or a team workstation where consistency and manageability matter, APT is the right choice. Move to Method 2 only if you specifically need a version newer than 0.50.0.

Step 3: Install the Latest Lazygit Binary from GitHub (Optional)

The latest upstream Lazygit release as of early 2026 is v0.55.1. If you need features from that release or any version newer than 0.50.0, the official GitHub binary install method gets you there without waiting for Debian’s package cycle to catch up.

This method places the binary at /usr/local/bin/lazygit, which keeps it outside APT’s management scope and makes upgrades a simple script re-run.

Step 3a: Query the Latest Version from the GitHub API

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" \
  | grep -Po '"tag_name": *"v\K[^"]*')

This command queries the GitHub releases API and extracts the version number dynamically. You do not need to hard-code a version string, so the same script works every time you want to upgrade.

Step 3b: Download the Release Archive

curl -Lo lazygit.tar.gz \
  "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"

If you are on an ARM-based Debian server, replace x86_64 with arm64. To confirm your architecture before downloading:

uname -m

Step 3c: Extract and Install the Binary

tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/

The install command copies the file, sets executable permissions, and places it in the target directory in one step. This is cleaner than cp followed by chmod.

Step 3d: Clean Up and Verify

rm lazygit.tar.gz lazygit
lazygit --version

The version output will now reflect the latest upstream release rather than the Debian-packaged version.

Upgrading This Installation Later

To update Lazygit installed via the binary method, re-run steps 3a through 3c. The API query will automatically fetch the latest version. There is no apt upgrade equivalent here, so set a reminder to check for new releases periodically or monitor the GitHub releases page.

Step 4: Install Lazygit from Source Using Go (Advanced)

This method is best suited for Go developers who want to compile Lazygit themselves, contribute to the codebase, or test a development branch. It requires Go 1.21 or later.

Step 4a: Install Go on Debian 13

sudo apt install golang
go version

Confirm the output shows go1.21 or higher before continuing.

Step 4b: Clone the Repository and Build

git clone https://github.com/jesseduffield/lazygit.git
cd lazygit
go install

The go install command compiles the binary and drops it into ~/go/bin/.

Step 4c: Add Go’s Bin Directory to Your PATH

export PATH=$PATH:$(go env GOPATH)/bin

To make this permanent, add that line to your ~/.bashrc or ~/.zshrc:

echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
source ~/.bashrc

Step 4d: Verify the Build

lazygit --version

Note: binaries compiled from source will show version=unversioned in the output. This is expected behavior and does not indicate a broken installation.

Step 5: Launch Lazygit and Navigate the Interface

With installation done, open a terminal, navigate into any existing Git repository, and run:

cd /path/to/your/repo
lazygit

If you do not have a test repo handy, create one quickly:

mkdir test-repo && cd test-repo
git init
touch README.md
lazygit

Understanding the Five-Panel Layout

The Lazygit TUI opens with five panels:

Panel Location Purpose
Files Left Shows staged and unstaged changes
Branches Left (tab) Lists local and remote branches
Commits Left (tab) Displays full commit history
Stash Left (tab) Manages stashed changes
Main Right (large) Shows diffs, logs, or file content

Navigation basics:

  • Use arrow keys or h/j/k/l (Vim-style) to move between items
  • Use Tab to switch between the five left panels
  • Press Space on a file to stage or unstage it
  • Press c to open the commit message prompt
  • Press p to push, P to pull
  • Press ? to open the full, context-sensitive keybindings help menu
  • Press q to quit

The ? menu is your best friend when learning. It shows different keybindings depending on which panel is currently active, so the help is always relevant to what you are doing.

Step 6: Configure a Shell Alias and Basic Settings

Set Up the lg Alias

Most Lazygit users set a short alias to launch it faster. Open your shell config file:

nano ~/.bashrc

Add this line at the bottom:

alias lg='lazygit'

Save and reload:

source ~/.bashrc

Now you can type lg from any Git repository to launch Lazygit instantly.

Configure Lazygit on Debian 13

Lazygit’s global configuration file lives at ~/.config/lazygit/config.yml. Create the directory and file if they do not exist yet:

mkdir -p ~/.config/lazygit
touch ~/.config/lazygit/config.yml

Open it with any editor:

nano ~/.config/lazygit/config.yml

A few useful options to set from the start:

gui:
  theme:
    lightTheme: false
  showIcons: true
git:
  paging:
    colorArg: always
    pager: delta

The pager: delta line enables the delta diff viewer if you have it installed, which significantly improves how diffs look inside Lazygit. Install delta separately with sudo apt install git-delta if you want to use it.

Troubleshooting Common Issues

Even a straightforward Lazygit install can hit a snag depending on the system’s state. Here are the five most common issues and how to fix them.

Error 1: lazygit: command not found After Binary Install

Cause: The binary ended up in a directory that is not in your $PATH, or the shell session has not been reloaded since installation.

Fix:

echo $PATH

Confirm that /usr/local/bin appears in the output. If it does not:

export PATH=$PATH:/usr/local/bin
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
source ~/.bashrc

Error 2: curl: command not found During Method 2

Cause: Minimal Debian 13 server images often ship without curl.

Fix:

sudo apt install curl

Then re-run the binary download commands from Step 3a.

Error 3: Lazygit Opens but Git Commands Fail Inside the TUI

Cause: Git is not installed, or you launched Lazygit from a directory that is not a Git repository.

Fix:

sudo apt install git
git --version

If you are in the right directory but Git still fails, initialize the repo:

git init

Error 4: Segmentation Fault on Launch After Manual Binary Copy

Cause: Copying a Lazygit binary from another machine without matching the target architecture causes this. An x86_64 binary will segfault on an arm64 system.

Fix: Remove the broken binary and reinstall cleanly using the correct architecture tarball:

sudo rm /usr/local/bin/lazygit
uname -m

Use the output of uname -m to select the correct tarball in Step 3b, then reinstall.

Error 5: Package lazygit has no installation candidate

Cause: The system is running Debian 12 (Bookworm) or an older release, not Debian 13 Trixie. Lazygit entered Debian’s official repo only in Trixie.

Fix: Confirm your Debian version:

cat /etc/debian_version

If it shows 12.x or earlier, either upgrade to Debian 13 Trixie, or use Method 2 (GitHub binary) to install Lazygit on the current version without APT.

How To Uninstall Lazygit on Debian 13

If you need to remove Lazygit for any reason, the process depends on which installation method you used.

APT install:

sudo apt remove lazygit

To also remove configuration files managed by APT:

sudo apt purge lazygit

GitHub binary install:

sudo rm /usr/local/bin/lazygit

Go source build:

rm ~/go/bin/lazygit

Remove the config directory (all methods):

rm -rf ~/.config/lazygit

Also remove any alias you added to ~/.bashrc or ~/.zshrc manually.

Congratulations! You have successfully installed Lazygit. Thanks for using this tutorial for installing Lazygit on your Debian 13 “Trixie” system. For additional or useful information, we recommend you check the official Lazygit website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a dedicated and highly skilled Linux Systems Administrator with over a decade of progressive experience in designing, deploying, and maintaining enterprise-grade Linux infrastructure. His professional journey began in the telecommunications industry, where early exposure to Unix-based operating systems ignited a deep and enduring passion for open-source technologies and server administration.​ Throughout his career, r00t has demonstrated exceptional proficiency in managing large-scale Linux environments, overseeing more than 300 servers across development, staging, and production platforms while consistently achieving 99.9% system uptime. He holds advanced competencies in Red Hat Enterprise Linux (RHEL), Debian, and Ubuntu distributions, complemented by hands-on expertise in automation tools such as Ansible, Terraform, Bash scripting, and Python.
Back to top button