# Portainer update 2.21.0

**URL:** https://dietpi.com/forum/t/portainer-update-2-21-0/21070
**Category:** Troubleshooting
**Created:** [3 September 2024 10:54 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070 "2024-09-03T10:54:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![michapixel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@michapixel](https://dietpi.com/forum/u/michapixel)
#### Post date: [3 September 2024 10:54 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070/1 "2024-09-03T10:54:08Z")

</div>

i’ve tried updating portainer to the latest as of now (2.21.0) with:

```auto
dietpi-software reinstall 185

```

> **[DietPi.com Docs - Development and Programming Software Options](https://dietpi.com/docs/software/programming/#portainer-update-to-latest-version)**
>
> Description of DietPi software options related to software development

i did a full backup in front.  
But the update failed because the (portainer) image cannot be removed/overwritten, because it’s in use by a container.  
so i used a subshell as proposed by the dialogue, did “docker stop portainer”, exited, retried, failed again. i stopped all containers, no success, image is still used. so i forcefully removed the image, retried the update but that failed with another error that now the image is missing …

well i restored the backup, which went butter-smooth.

But i want this new version so much 😉

what can i do?

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [3 September 2024 11:24 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070/2 "2024-09-03T11:24:33Z")

</div>

> [@Cannot update portainer due to container being used?](https://dietpi.com/forum/t/cannot-update-portainer-due-to-container-being-used/19686/5):
>
> latest version is 2.19.4 isn’t it? At least that’s the one marked as stable. Even if 2.20. have been released yesterday anyway. From the error menu, open a subshell and stop the container docker stop portainer Btw: I did a simple test an it was working without issues DietPi-Software ───────────────────────────────────────────────────── Step: Installing Portainer: Simplifies container management in Docker (standalone host) [OK] DietPi-Software | docker container rm -f 109306c…

---

<div class="post-metadata">

### Author: ![michapixel](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@michapixel](https://dietpi.com/forum/u/michapixel)
#### Post date: [3 September 2024 12:06 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070/3 "2024-09-03T12:06:24Z")

</div>

> **[Release Release 2.21.0 · portainer/portainer](https://github.com/portainer/portainer/releases/tag/2.21.0)**
>
> This is our first Long-Term Support (LTS) release, which includes all the changes that have been added up to the 2.20.3 release, as well as various fixes aimed at enhancing the stability and scalab...

this is tagged as latest:

> **[GitHub - portainer/portainer: Making Docker and Kubernetes management easy.](https://github.com/portainer/portainer?tab=readme-ov-file#latest-version)**
>
> Making Docker and Kubernetes management easy.

i did manage to update from 2.19.x to 2.20.3 manually by stopping it, but now this way doesn’t work for me.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [3 September 2024 21:08 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070/4 "2024-09-03T21:08:04Z")

</div>

strange behaviour of Docker, I was never able to replicate this. At least on a fresh installation, reinstalling works without problems.

Theoretically, you can stop the container manually and delete the image.

```auto
docker container rm -f <conatiner_ID>
docker image rm <image_ID>

```

After that, the reinstallation should work as follows

```auto
docker run -d -p 9002:9000 --name=portainer --restart=always -v /run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

```

---

<div class="post-metadata">

### Author: ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)
#### Post date: [1 March 2025 09:08 UTC](https://dietpi.com/forum/t/portainer-update-2-21-0/21070/5 "2025-03-01T09:08:15Z")

</div>

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.
