how to install gnome 41 on debian 11

How To Install the Latest GNOME on Debian (3 Easy Steps)

Using Debian is fine when you are looking for stability and don’t necessarily need the latest version of every application or service. But if for some reason you want to install more recent versions, it’s not really intuitive. In this tutorial, I’ll 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 by the apt command.

Want the best experience? Become a premium member for ad-free browsing, access exclusive content, and ask questions in our private forums. Your membership helps support the site!
Linux doesn’t have to be intimidating. With my e-book, Master Linux Commands, you’ll uncover the secrets of the terminal in a fun, step-by-step journey. From basics to scripts, get ready to level up your Linux skills. Oh, and did I mention the handy cheat sheet you get as a bonus?

Prerequisite: Update Your System

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:
    su
    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

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

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

Add the Unstable Repository to Your Sources.list

What Does “Unstable” Really Mean?

At the time of this writing, the version of GNOME included with Debian 12 (codename bookworm) is GNOME 43, which is close to 2 years old:

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!
Download now
debian 12 bookworm showing gnome version

Since then, many newer versions have been released. The latest one is GNOME 46 at the time of writing.

Hopefully, GNOME 46 is available in the Debian repository, but only on the “unstable” server. As you may know, a new version for any package moves this way through Debian releases:
experimental => unstable => testing => stable

Unstable is not necessarily something you would use on a server or on a critical setup.

But we’re talking about a big project (GNOME) that has been around for at least 6 months, so most bugs have already been fixed. Also, most distributions use this newer version 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 http://deb.debian.org/debian/ unstable main contrib
    deb-src http://deb.debian.org/debian/ unstable main contrib
  • It should look something like this:
    debian sources.list showing addition of unstable repos
  • Save & exit (with nano: CTRL+O, CTRL+X).

Warning: Don’t do 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 for the latest version available from all the servers in sources.list and download the most recent one for every package on the system. We don’t want that; we only want to use the unstable repository for GNOME.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!
Download now

To fix this behavior, you can edit the APT preferences file:

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

    Package: *
    Pin: release a=unstable
    Pin-Priority: 100
  • Save & exit. Your file should look like this:
    apt preferences file showing addition of unstable repoAs you can see, we’ve set a priority for each repository. As 500 is higher than 100, APT will use the bookworm repo first, and then search the unstable repo only if the package you want to install is not available in the main one. This way, you won’t receive all of your system updates from the unstable server when we run the next command.
  • You can now sync the repositories again with:
    apt update

We’re now ready to tell APT to get packages from the unstable repo when specified in the command.

Install the Latest GNOME Version on Debian

Using APT with the “-t unstable” parameter tells it to get packages from the unstable repository. You can use this parameter with the search option to see which version would be installed. For example:

apt search command showing gnome versions stable vs. unstable

As you can see, the gnome-session-bin version is 43.0 by default, but it’s version 46.0 in the unstable repository. That’s why we want to use the unstable repo for our GNOME update.

After adding the unstable repo to the sources.list file and preferences file, the apt command 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 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 a few times. When update notes appear, press “q” to exit them and continue:

And when prompted to restart services, hit accept if there is nothing critical on your system:

Once the installation is complete, you’ll need to reboot 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

That’s it! GNOME 46 is now installed on my Debian 12 system. If you’ve installed the screenfetch package, you can use it to check the exact version:

screenfetch app showing new gnome version
Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!
Download now

Keep GNOME Up-to-Date

To install the latest GNOME version from the unstable repository, we had to explicitly use the “apt install -t” command. There’s just one problem: your system updates will never get the new versions from the unstable servers unless you run the same command again.

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=bookworm
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).
  • Sync your repo list with:
    apt update

That’s it—you now have the latest GNOME version on your Debian system. I hope this article was useful, and remember that you can take the same steps for any application:

  • Use the search command to see which version is available in each repository.
  • If you’re confident to try the latest version, add the “-t unstable” parameter to your apt command.
    Just remember to also update any related packages (in my example, updating PHP modules like php-curl or php-gd if you use them is probably a good idea to avoid any issues).
  • Enjoy!
Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.

Additional Resources

Overwhelmed with Linux commands?
My e-book, “Master Linux Commands”, is your essential guide to mastering the terminal. Get practical tips, real-world examples, and a bonus cheat sheet to keep by your side.
Grab your copy now.

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.

Similar Posts