Update Portainer Community Edition
Stop and remove your existing Portainer instance. This will not affect your other Docker containers.
sudo docker stop portainer && sudo docker rm portainer
Pull the latest Portainer-CE image.
docker pull portainer/portainer-ce:latest
Deploy the new Portainer container.
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Note: you may need to run these commands as root/sudo if you're not logged in as root.