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
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.