Can't seem to install a desktop enviroment on my existing install of dietpi

Creating a bug report/issue

I have searched the existing open and closed issues


  • Date | Tue Feb 20 10:33:52 GMT 2024
  • Bug report | 6c81168d-92a7-41a0-8266-b7cc86c9a95b
  • DietPi version | v9.1.1 (MichaIng/master)
  • Image creator |
  • Pre-image |
  • Hardware | Native PC (x86_64) (ID=21)
  • Kernel version | Linux viperhome 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
  • Distro | bullseye (ID=6)
  • Command | apt-get -y --allow-change-held-packages install xserver-xorg-core xserver-xorg-input-libinput xinit dbus-user-session xfonts-base x11-xserver-utils x11-utils
  • Exit code | 100
  • Software title | DietPi-Software

Additional Information (if applicable)

  • Software title | DietPi-Software
  • Was the software title installed freshly or updated/migrated? Yes
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | `6c81168d-92a7-41a0-8266-b7cc86c9a95b’

Steps to reproduce

  1. Launch dietpi-software
  2. Navigate to browse software
  3. Install one of the desktop enviroments

Expected behaviour

  • Install process should go through and install the desktop enviroment

Actual behaviour

  • seems to error out with libpam-systemd dependencies

Extra details

Additional logs:

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpam-systemd : Depends: systemd (= 247.3-7+deb11u4) but 252.5-2~bpo11+1 is to be installed
E: Unable to correct problems, you have held broken packages.

For some reason you run systemd version which comes with Debian bookworm, but your system is still on bullseye. Did you do an upgrade to bookworm recently or someting link that?

not that I remember stuck to using dietpi-update for any updating…

Hmm did you maybe installed someting manually what would need a newer systemd version, like home assistant or so?
Can you also check:

cat /etc/apt/sources.list
~$ cat /etc/apt/sources.list
deb bullseye main contrib non-free
deb bullseye-updates main contrib non-free
deb bullseye-security main contrib non-free
deb bullseye-backports main contrib non-free

One thing I just remembered adding was a web interface called casa os that may be the cause but am unsure

I think it’s coming from bullseye-backports, they serve systemd 252.5.
But not sure if this is something DietPi changed.
@Joulinar do you have an idea?

lets check all apt source available.

for i in /etc/apt/sources.list{,.d/*.list}; do echo "$i:"; cat "$i"; done

maybe it’s coming from Debian backports

~$ for i in /etc/apt/sources.list{,.d/*.list}; do echo "$i:"; cat "$i"; done
deb bullseye main contrib non-free
deb bullseye-updates main contrib non-free
deb bullseye-security main contrib non-free
deb bullseye-backports main contrib non-free
deb bullseye-backports main
# Source: Caddy
# Site:
# Repository: Caddy / xcaddy
# Description: Build Caddy with plugins (requires Go installed)

deb [signed-by=/usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg] any-version main

deb-src [signed-by=/usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg] any-version main
deb bullseye main
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg]   bullseye stable
deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] ./
# this file was generated by for
# the repository at

deb [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] bullseye main
deb-src [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] bullseye main

Did you added this one yourself?

As well can you share following

dpkg -l systemd
apt policy systemd

I do not remember adding /etc/apt/sources.list.d/backports.list maybe I did and just forgot about it? but it doesn’t make sense… looking at it was modified around Jan 22 trying to remember if I did somehow add it… but honestly can’t remember but looking at the information available to me now it seems like that source is causing the error

:~$ dpkg -l systemd
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version         Architecture Description
ii  systemd        252.5-2~bpo11+1 amd64        system and service manager
:~$ apt policy systemd
  Installed: 252.5-2~bpo11+1
  Candidate: 252.5-2~bpo11+1
  Version table:
 *** 252.5-2~bpo11+1 100
        100 bullseye-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     247.3-7+deb11u4 500
        500 bullseye/main amd64 Packages
        500 bullseye-updates/main amd64 Packages
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/backports.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/backports.list:1

I would recommend removing /etc/apt/sources.list.d/backports.list as it just duplicates the source list entries. However this will not fix your challenge.

ok you already have the package installed from Debian Backports. Was this intended? At least this will not happen automatically, and it is causing conflicts now.

Let’s check if there are more packages from Backports. Hope following will show something.

dpkg -l | grep bpo11
~$ dpkg -l | grep bpo11
rc  cockpit-ws                           287-1~bpo11+1                  amd64        Cockpit Web Service
ii  libsystemd-shared:amd64              252.5-2~bpo11+1                amd64        systemd shared private library
ii  libsystemd0:amd64                    252.5-2~bpo11+1                amd64        systemd utility library
ii  systemd                              252.5-2~bpo11+1                amd64        system and service manager
ii  systemd-timesyncd                    252.5-2~bpo11+1                amd64        minimalistic service to synchronize local time with NTP servers

just ran it… man I should really do some spring cleaning on this system I haven’t used cockpit in a while…

Basically you have 2 options. Downgrade all packages that has been installed via Backports or full upgrade your system to Debian Bookworm. For the second option we would have a blog post including an upgrade script.

I think it would be easier to upgrade… I think… what would you recommend?

Thanks ran the script and followed the steps no errors so I think we are all good thanks!!

Hope you are able to install desktop now

Another option would have been:

apt install -t bullseye-backports libpam-systemd

Nasty that APT does not pull the backports version of this package automatically when systemd is from backports already :thinking:.