Background
Sometimes it’s necessary to uninstall completely, and reinstall when testing software. This is something I have been doing with podman on RHEL 7.6 since about 6AM today 🙂 I figured it was worth capturing the instructions I have developed while testing user namespaces and rootless containers. This could make your life easier too.
Complete Uninstall
Run the following commands:
rm -rf /etc/containers/* /var/lib/containers/* /etc/docker /etc/subuid* /etc/subgid*
yum remove buildah skopeo podman containers-common atomic-registries docker
Remember to delete any users and their associated containers storage:
rm -rf /home/fatherlinux/.local/share/containers/
Or:
userdel -r fatherlinux
Fresh Install
Run the following commands:
yum install podman buildah skopeo
RE: Testing With Podman – Complete Uninstall/Reinstall
Dear Scott,
I found your blog entry after encountering the following errors on RHEL 9.3(Plow) server: “WARN[0000] Found incomplete layer…”
After backing-up my /etc/subuid and /etc/subgid files, I ran your recommended uninstall & reinstall commands as follows:
sudo rm -rf /etc/containers/* /var/lib/containers/* /etc/docker /etc/subuid* /etc/subgid*
sudo yum remove buildah skopeo podman containers-common atomic-registries docker
sudo rm -rf /home//.local/share/containers/
yum install podman buildah skopeo
Everything seemed to go well until I ran into the following error running “podman run hello-world” as rootless:
“podman hello-world Error: OCI runtime error: crun: cannot setresuid to `1000`: Invalid argument”
Consequently, I restored my subuid/subgid files thinking it was related, and still received the same error until I issued the following command:
podman system reset <– issued as rootless user
Then, "podman run hello-world" worked but cockpit's api socket wasn't running until I issued the following admin commands:
sudo systemctl enable –now podman.socket
sudo reboot
Working now. THANK YOU.
Very grateful you posted this information. I love Red Hat! You and Mr. Walsh are my new super heroes!!!
Sincerely,
Marc
Thank you for this feedback, and I hope your comment helps others! The “system reset” sub-command can be a life saver! Thank you, and I’ll tell Dan you sent kind word!!! 😉