# Update failed because of wrong installation?

**URL:** <https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630>\
**Category:** Installation\
**Tags:** raspberry-pi\
**Created:** [July 17, 2023, 7:57am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630 "2023-07-17T07:57:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 17, 2023, 7:57am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/1 "2023-07-17T07:57:35Z")

</div>

Hello,  
I use Grafana v7.4.3 on a raspberry Pi with raspbian. I wanted to update Grafana to v 10 and failed with

`apt-get upgrade`

I found out that I don’t have an apt installation:

$ apt-cache policy grafana  
grafana:  
Installed: (none)  
Candidate: (none)

I don’t know how I installed grafana. So my question is how can I update grafana without loosing my configuration or it is better to make a new installation?  
I read this:  
[https://grafana.com/docs/grafana/latest/upgrade-guide/](https://grafana.com/docs/grafana/latest/upgrade-guide/)

Maybe I can use the Binary .tar file method but I think a fresh installation is maybe better. Can you please help me ?  
I am no linux expert!  
Thank you!  
Regards  
Thomas

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 17, 2023, 2:07pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/2 "2023-07-17T14:07:40Z")

</div>

if you do not know how you installed it this is what I would recommend  
back up your data and your conf folders first  
stop the grafana service not sure how in pi  
then install a new separate version of grafana  
start that new grafana  
stop this new grafana  
copy over the backed up folders  
start new grafana

I am not sure if a jump from 7 to 10 is possible so I would go one full version upgrade at a time using the above upgrade method  
7 =\> 8  
8 =\> 9  
9 =\> 10

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 17, 2023, 8:17pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/3 "2023-07-17T20:17:16Z")

</div>

I installed grafana new as described here with apt

[https://grafana.com/tutorials/install-grafana-on-raspberry-pi/](https://grafana.com/tutorials/install-grafana-on-raspberry-pi/)

and saved the lib file as desrcibed here before installation:

([Backup / Restore to new system](https://community.grafana.com/t/backup-restore-to-new-system/37218))

the installation text was this:

```auto
$ sudo apt-get install -y grafana
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libva-wayland2 raspinfo
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  grafana
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 80.4 MB of archives.
After this operation, 302 MB of additional disk space will be used.
Get:1 https://packages.grafana.com/oss/deb stable/main arm64 grafana arm64 10.0.2 [80.4 MB]
Fetched 80.4 MB in 7s (11.1 MB/s)                                                                                           
Selecting previously unselected package grafana.
(Reading database ... 109888 files and directories currently installed.)
Preparing to unpack .../grafana_10.0.2_arm64.deb ...
Unpacking grafana (10.0.2) ...
Replaced by files in installed package grafana-rpi:armhf (7.4.3) ...
Setting up grafana (10.0.2) ...
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server

```

no erros, but my grafana is still the old version and the lib file was not changed  
I don’t know what to do now ?

```auto
apt-cache policy grafana
grafana:
  Installed: 10.0.2
  Candidate: 10.0.2

```

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 17, 2023, 8:25pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/4 "2023-07-17T20:25:52Z")

</div>

now garfana stopped working…

```auto
● grafana-server.service - Grafana instance
     Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-07-17 22:23:33 CEST; 14s ago
       Docs: http://docs.grafana.org
    Process: 2460257 ExecStart=/usr/sbin/grafana-server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths>
   Main PID: 2460257 (code=exited, status=1/FAILURE)
        CPU: 1.563s

Jul 17 22:23:33 raspberrypi systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Jul 17 22:23:33 raspberrypi systemd[1]: Stopped Grafana instance.
Jul 17 22:23:33 raspberrypi systemd[1]: grafana-server.service: Consumed 1.563s CPU time.
Jul 17 22:23:33 raspberrypi systemd[1]: grafana-server.service: Start request repeated too quickly.
Jul 17 22:23:33 raspberrypi systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jul 17 22:23:33 raspberrypi systemd[1]: Failed to start Grafana instance.

```

it starts and a few seconfs later it is stopped 😕

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 17, 2023, 9:52pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/5 "2023-07-17T21:52:27Z")

</div>

you installed it on the existing rpi or a new pi? what happened to the installation of the old grafana

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 18, 2023, 6:02am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/6 "2023-07-18T06:02:46Z")

</div>

I installed v10 on the existing RPi  
I don’t know what happend with the existing v 7, I didn’t removed it because I don’t know  
still the same question…

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 18, 2023, 8:02am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/7 "2023-07-18T08:02:46Z")

</div>

What version of rpi and what processor type is it

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 18, 2023, 1:55pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/8 "2023-07-18T13:55:28Z")

</div>

Raspberry Pi 4 Modell B, 4GB

Broadcom BCM2711 chip set  
64 bit Quad Core ARM v8 Cortex-A72 @ 1,5 GHz

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 18, 2023, 2:42pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/9 "2023-07-18T14:42:52Z")

</div>

So which of these **ARM** downloads fits your rpi?

> **[Download Grafana | Grafana Labs](https://grafana.com/grafana/download/7.4.3?platform=arm&edition=oss)**
>
> Overview of how to download and install different versions of Grafana on different operating systems.

Are you sure you did not install it using docker maybe?

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 18, 2023, 9:07pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/10 "2023-07-18T21:07:35Z")

</div>

for V10 I used this way  
[https://grafana.com/tutorials/install-grafana-on-raspberry-pi/](https://grafana.com/tutorials/install-grafana-on-raspberry-pi/)

for the old version 7 I still don’t know which why I installed it

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [July 18, 2023, 9:11pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/11 "2023-07-18T21:11:20Z")

</div>

can nobody tell me how I can delete all grafana versions from my raspberry Pi and install it again ?

---

<div class="post-metadata">

**Author:** ![antonio](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/antonio/32/26584_2.png) [@antonio](https://community.grafana.com/u/antonio)\
**Post date:** [July 26, 2023, 8:52am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/12 "2023-07-26T08:52:40Z")

</div>

@obstbauer

perhaps Grafana was installed more than once and in different ways (via [package manager](https://grafana.com/tutorials/install-grafana-on-raspberry-pi/), via [standalone binary](https://grafana.com/grafana/download?platform=arm&edition=oss)) you could check what’s in your raspberry folder for binaries.

```auto
mypi@mypi:~ $ which grafana
/usr/sbin/grafana

```

```auto
mypi@mypi:~ $ cd /usr/sbin
mypi@mypi:/usr/sbin $ ls

```

![image](https://us1.discourse-cdn.com/grafana/original/3X/5/1/5141329e834843fe3d7f70a0085146e45b88a919.png)

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 15, 2023, 2:36pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/13 "2023-08-15T14:36:27Z")

</div>

Hello antonio!  
with

```auto
mypi@mypi:~ $ cd /usr/sbin
mypi@mypi:/usr/sbin $ ls

```

I get

grafana-cli  
grafana-server

there is no “grafana” as in your screenshot

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 16, 2023, 2:24pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/14 "2023-08-16T14:24:32Z")

</div>

no idea ?

---

<div class="post-metadata">

**Author:** ![antonio](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/antonio/32/26584_2.png) [@antonio](https://community.grafana.com/u/antonio)\
**Post date:** [August 17, 2023, 8:35am UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/15 "2023-08-17T08:35:07Z")

</div>

I guess I see the folder ‘grafana’ because I followed this [installation guide](https://grafana.com/tutorials/install-grafana-on-raspberry-pi/).

Anyway, since you want to start over, try to :

Uninstall just grafana:

```auto
apt-get remove grafana

```

or

Uninstall grafana and its dependencies:

```auto
sudo apt-get remove --auto-remove grafana

```

[reference](https://community.grafana.com/t/how-uninstall-all-of-grafana/41732/21)  
Hope it helps

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 17, 2023, 12:14pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/16 "2023-08-17T12:14:30Z")

</div>

with

```auto
sudo apt-get remove --auto-remove grafana

```

I get the message “grafana is not installed, so not removed”

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 17, 2023, 12:17pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/17 "2023-08-17T12:17:10Z")

</div>

I used

```auto
sudo apt-get purge grafana

```

but grafana 7.4.3 is still running

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 17, 2023, 12:39pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/18 "2023-08-17T12:39:46Z")

</div>

> dpkg -l

shows me

"grafana-rpi:armhf in version 7.4.3

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [August 17, 2023, 1:19pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/19 "2023-08-17T13:19:41Z")

</div>

You have to go full on CSI here.

Maybe you have a service that points to the grafana-server

Can you do a grep search for both grafana and any ini file?

---

<div class="post-metadata">

**Author:** ![obstbauer](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@obstbauer](https://community.grafana.com/u/obstbauer)\
**Post date:** [August 17, 2023, 1:49pm UTC](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630/20 "2023-08-17T13:49:03Z")

</div>

sorry I don’t understand what I should do now

[Next page](https://community.grafana.com/t/update-failed-because-of-wrong-installation/91630.md?page=2)
