The Easiest Way To Install GNOME 41 on Debian 11 (3 Steps)

Using Debian is fine when you are looking for stability and don’t necessarily need the latest version of each application or service. But if for some reason, you want to install a more recent one, it’s not really intuitive. In this tutorial, I will explain how to install the latest version of GNOME, but it works the same way for any package.

The latest version of GNOME is not available in the default repository, only in the unstable one. To install it on Debian, the apt command can be used only once the unstable repository has been added in the “sources.list” file.

Don’t worry, I’ll give you all the commands to safely add it to your system. We’ll configure it to only use the unstable repository for GNOME packages or when explicitly requested in the apt command.

Prerequisite: Do your system updates

As before any new project or service installation, the Debian system needs to be updated first. This will avoid any issues later on, especially with package versions unavailable.

  • Open a terminal.
  • Either use root or sudo, depending on your system settings.
    You can generally switch to root with this command:
    Or if you only have the sudo privilege, add the prefix “sudo” to each command I give in this tutorial:
    sudo <command>
  • Sync the repository packages versions with:
    apt update
  • Upgrade the packages that need an update:
    apt upgrade

It will require more or less time depending on how often you usually do it. Once done, you can move to the next step.

Note: if you are trying to follow this tutorial on a minimal Debian installation (without any desktop interface), the easiest way would be to use “tasksel” first to install the current GNOME version, and then continue this procedure to update it. There are many requirements for GNOME and “tasksel” will install all of them for you:

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Linux!

Add the unstable repository to your sources.list

What “unstable” really mean?

The current version of GNOME on Debian 11 at the time of writing is 3.38, which is around 16 months old:

GNOME 40 was released 1 year ago, and 41 has been out for 5 months. That’s the version I’m trying to install for you. Hopefully, GNOME 41 is available in the Debian repository, but only on the “unstable” server. As you may already know, a new version for any package move this way:
experimental => unstable => testing => stable

So, unstable is not necessarily something you would use on a server or on a critical setup. But we are talking of a big project (GNOME) that has been around for almost 6 months, so most bugs are already fixed, and most distributions are using it by default, so it’s not really risky if you are mainly using your Debian PC for desktop usage.

Add the unstable repository to your packages sources

Anyway, here is how to add the unstable repository on Debian:

  • Open the sources.list file with your favorite text editor, for example:
    nano /etc/apt/sources.list
    Remember to use sudo or an administrator terminal for doing this.
  • Add these lines at the end of the file:
    deb unstable main contrib
    deb-src unstable main contrib
  • It should look something like:
  • Save and exit (with nano: CTRL+O, CTRL+X).

Don’t do the system updates for now, or it will update everything from the unstable repository.

Are you a bit lost in the Linux command line? Check this article first, for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.

Adjust the preferences

By default, apt will check the latest version available on all the servers configured in sources.list, and download the most recent one for each package on the system. We don’t want that, we only want to use the unstable repository for GNOME.

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Linux!

To fix this, you can configure the apt behavior by editing one file:

  • Open the apt preferences file:
    nano /etc/apt/preferences
    If the file doesn’t exist, we’ll create it.
  • Paste these lines in it:
    Package: *
    Pin: release a=bullseye
    Pin-Priority: 500

    Package: *
    Pin: release a=unstable
    Pin-Priority: 100

    As you can see, with set a priority for each repository.
    As 500 is higher than 100, apt will use the bullseye repository first, and the unstable one only if there is the package you want to install is not available in the main one. This way, you won’t receive all the updates from the unstable server with the next command.
  • Your file should look like this:
  • You can now sync the repositories again with:
    apt update

We are now ready to use apt and tell it to get the packages from the unstable servers when specified in the command.

Install the latest GNOME version on Debian

After setting up the unstable repository in the sources.list file and preferences file, apt can be used to install the latest GNOME version on Debian. The exact command to do this is:
apt -t unstable install gnome-session gnome-shell gnome-backgrounds gnome-applets gnome-control-center mutter gjs

The “-t unstable” parameter tells apt to use the unstable repository to get these packages. This way, we’ll get the latest version. You can also use it with the search option to see which version would be installed, for example:

As you can see, gnome-session-bin version is 3.38 by default and 41.3 in the unstable repository. That’s why we use the unstable server for this installation.

The command may take a while to complete, as there are a lot of packages to download and install. Be patient. During the installation, you may be prompted to answer a few questions, press “q” to exit the update notes, and you can accept to restart all services if there is nothing critical on your system:

Once the installation is completed, you need to restart your system to start Debian with the latest GNOME version. You may also need to update other packages, depending on the ones you use. Use the same command as previously to install them from the unstable repository. For example:
apt -t unstable install gnome-tweaks

Help me help them <3
Help me raise funds for education by donating to my Pencils of Promise campaign.
Together we could fund a school for them!

That’s it, GNOME 41 is now installed on my Debian 11 system:

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Linux!

Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.

Keep GNOME up-to-date

To install the latest GNOME version, we had to get the packages from the unstable repository, by explicitly adding the “-t” parameter to the “apt install” command. The issue with this is that your system updates will never get the new versions from the unstable servers unless you run the same command again regularly.

This is not optimal. You can edit your preferences file to tell apt to upgrade the packages we installed from the unstable server only. For example, you can use something like:

Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 100

Package: gnome-session
Pin: release a=unstable
Pin-Priority: 1000

Package: gnome-backgrounds
Pin: release a=unstable
Pin-Priority: 1000

Package: gnome-applets
Pin: release a=unstable
Pin-Priority: 1000

Package: gnome-control-center
Pin: release a=unstable
Pin-Priority: 1000

Package: mutter
Pin: release a=unstable
Pin-Priority: 1000

Package: gjs
Pin: release a=unstable
Pin-Priority: 1000

You set a higher priority for the package we installed manually, telling apt to use the unstable repository for these packages when it checks for new versions. This way, when you do your regular “apt update/upgrade”, GNOME will also be updated with the new fixes and features updates.

  • Open the preferences file:
    nano /etc/apt/preferences
  • Paste the lines given above.
    Feel free to add any package you installed manually from the unstable server. Add a new paragraph for each of them, as in my example.
  • Save and exit (CTRL+O, CTRL+X).
  • Update your repository list with:
    apt update

That’s it, you can now use the latest GNOME version on your Debian system (which is GNOME 41 at the time of writing). I hope this article was useful, and remember that you can do the same thing for any application:

  • Use the search command to see which version is available in each repository.
  • If you are confident to try the latest version, add the “-t unstable” parameter to your apt command.
    Just remember to also update the related package (in my PHP example, updating packages like php-curl or php-gd if you use them is probably a good idea to avoid any issue).
  • Enjoy!
Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Linux!

Additional Resources

Lost with the command line?
You don’t need to learn and remember everything, just download my cheat sheet where I explain the most important commands on Linux, with a brief explanation and some examples.
Download my free PDF cheat sheet.

VIP Community
If you just want to hang out with me and other Linux fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Python is a great language to get started with programming on any Linux computer.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now.

Patrick Fromaget

I'm the lead author and owner of My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Recent Posts