Debian package failing?

  • What Grafana version and what operating system are you using? Grafana 13.1.1 from the Grafana repository on Debian Unstable last upgraded last week

  • What are you trying to achieve? Update Grafana to the latest version.

  • How are you trying to achieve it? sudo apt upgrade after properly configuring the external repository.

  • What happened?
    Setting up grafana (13.1.1)…
    mv: cannot overwrite '/var/lib/grafana/plugins-bundled': Directory not empty
    dpkg:error processing package grafana (--configure):
    old grafana package postinst maintainer script subprocess failed with exit status 1

  • What did you expect to happen? Upgrade succeeded.

  • Did you follow any online instructions? If so, what is the URL? Install Grafana on Debian or Ubuntu | Grafana documentation

What says in the tin ^^^. Anyone else experiencing this or just me?

“Fixed” it by removing all the files in that directory, including “hidden” ones, but the packaging is still broken.

Yea,
Ran into this myself. This is a Grafana bug that should be fixed in the next update.
Check out this post.
https://community.grafana.com/t/upgrade-to-grafana-13-1-1-had-errors/163863

This is a confirmed packaging bug in Grafana 13.1.1, not anything specific to the setup.

There’s an open GitHub issue tracking it →

As per the maintainers, the fix is planned for Grafana 13.1.2.

In the meantime, this got the install unstuck cleanly:

sudo rm -rf /var/lib/grafana/plugins-bundled
sudo dpkg --configure -a

After removing the stale plugins-bundled directory and rerunning dpkg --configure -a, the package configured successfully. If apt still shows the upgrade as pending afterward, run sudo apt-get install -f to finish reconciling things.