Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to completely remove podman from mac? #11319

Closed
DarthPestilane opened this issue Aug 25, 2021 · 15 comments
Closed

How to completely remove podman from mac? #11319

DarthPestilane opened this issue Aug 25, 2021 · 15 comments
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@DarthPestilane
Copy link

I installed podman using homebrew on mac. How do I completely remove it? Simply brew uninstall podman ?

@Luap99
Copy link
Member

Luap99 commented Aug 25, 2021

@ashley-cui @baude PTAL

@ashley-cui
Copy link
Member

Yep. brew uninstall podman

@josh-m-sharpe
Copy link

josh-m-sharpe commented Apr 29, 2022

Seems like brew uninstall podman doesn't do all the things:

?130 (4:39:00 PM) ~/ (master) 😜 ps aux|grep podman
jsharpe          12105   0.1 11.5 412424192 3846768 s004  S     4:12PM   1:04.24 /opt/homebrew/bin/qemu-system-aarch64 -m 2048 -smp 1 -fw_cfg name=opt/com.coreos/config,file=/Users/jsharpe/.config/containers/podman/machine/qemu/podman-machine-default.ign -qmp unix://var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/qmp_podman-machine-default.sock,server=on,wait=off -netdev socket,id=vlan,fd=3 -device virtio-net-pci,netdev=vlan,mac=5a:94:ef:e4:0c:ee -device virtio-serial -chardev socket,path=/var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/podman-machine-default_ready.sock,server=on,wait=off,id=podman-machine-default_ready -device virtserialport,chardev=podman-machine-default_ready,name=org.fedoraproject.port.0 -accel hvf -accel tcg -cpu cortex-a57 -M virt,highmem=off -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on -drive file=/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_ovmf_vars.fd,if=pflash,format=raw -drive if=virtio,file=/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-36.20220421.dev.0-qemu.aarch64.qcow2 -display none
jsharpe          13240   0.0  0.0 408628368   1632 s003  S+    4:39PM   0:00.00 grep podman
jsharpe          12104   0.0  0.1 409251008  38096 s004  S     4:12PM   0:05.83 /opt/homebrew/opt/podman/libexec/gvproxy -listen-qemu unix:///var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/qemu_podman-machine-default.sock -pid-file /var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/podman-machine-default.pid -ssh-port 49933 -forward-sock /Users/jsharpe/.local/share/containers/podman/machine/podman-machine-default/podman.sock -forward-dest /run/user/502/podman/podman.sock -forward-user core -forward-identity /Users/jsharpe/.ssh/podman-machine-default
√ (4:39:04 PM) ~/ (master) 😜 brew uninstall podman
Uninstalling /opt/homebrew/Cellar/podman/4.0.3... (172 files, 46.2MB)
√ (4:39:09 PM) ~/ (master) 😜 ps aux|grep podman
jsharpe          13387   0.6  0.0 408628368   1632 s003  S+    4:39PM   0:00.00 grep podman
jsharpe          12105   0.1 11.5 412429232 3846912 s004  S     4:12PM   1:04.27 /opt/homebrew/bin/qemu-system-aarch64 -m 2048 -smp 1 -fw_cfg name=opt/com.coreos/config,file=/Users/jsharpe/.config/containers/podman/machine/qemu/podman-machine-default.ign -qmp unix://var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/qmp_podman-machine-default.sock,server=on,wait=off -netdev socket,id=vlan,fd=3 -device virtio-net-pci,netdev=vlan,mac=5a:94:ef:e4:0c:ee -device virtio-serial -chardev socket,path=/var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/podman-machine-default_ready.sock,server=on,wait=off,id=podman-machine-default_ready -device virtserialport,chardev=podman-machine-default_ready,name=org.fedoraproject.port.0 -accel hvf -accel tcg -cpu cortex-a57 -M virt,highmem=off -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on -drive file=/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_ovmf_vars.fd,if=pflash,format=raw -drive if=virtio,file=/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-36.20220421.dev.0-qemu.aarch64.qcow2 -display none
jsharpe          12104   0.0  0.1 409251008  38096 s004  S     4:12PM   0:05.83 /opt/homebrew/opt/podman/libexec/gvproxy -listen-qemu unix:///var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/qemu_podman-machine-default.sock -pid-file /var/folders/62/_hwr4js55n792krd00ch10yc0000gp/T/podman/podman-machine-default.pid -ssh-port 49933 -forward-sock /Users/jsharpe/.local/share/containers/podman/machine/podman-machine-default/podman.sock -forward-dest /run/user/502/podman/podman.sock -forward-user core -forward-identity /Users/jsharpe/.ssh/podman-machine-default

@josh-m-sharpe
Copy link

Seems like these were better steps:

podman list
podman machine list
podman machine stop podman-machine-default

podman machine rm podman-machine-default

The following files will be deleted:

/Users/jsharpe/.ssh/podman-machine-default
/Users/jsharpe/.ssh/podman-machine-default.pub
/Users/jsharpe/.config/containers/podman/machine/qemu/podman-machine-default.ign
/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_fedora-coreos-36.20220421.dev.0-qemu.aarch64.qcow2
/Users/jsharpe/.local/share/containers/podman/machine/podman-machine-default/podman.sock
/Users/jsharpe/.local/share/containers/podman/machine/qemu/podman-machine-default_ovmf_vars.fd
/Users/jsharpe/.config/containers/podman/machine/qemu/podman-machine-default.json


ps aux|grep podman
jsharpe          13798   0.0  0.0 408628368   1632 s003  S+    4:41PM   0:00.00 grep podman



 brew uninstall podman

@rhatdan
Copy link
Member

rhatdan commented May 1, 2022

brew unsinstall podman should default to those commands in its setup script.

@mongoliaredmountain
Copy link

image

How to uninstall podman?

@Kovah
Copy link

Kovah commented Jan 31, 2023

What if one has installed Podman through Podman Desktop and not through brew?

@captainepoch
Copy link

What if one has installed Podman through Podman Desktop and not through brew?

Was anybody uninstall it when installed this way?

@cdbca
Copy link

cdbca commented Feb 21, 2023

What if one has installed Podman through Podman Desktop and not through brew?

Was anybody uninstall it when installed this way?

which podman 
sudo rm -rf /opt/podman

@heyvito
Copy link

heyvito commented Mar 14, 2023

What if one has installed Podman through Podman Desktop and not through brew?

Was anybody uninstall it when installed this way?

I had to remove it after Podman Desktop installed it, and I did this:

  1. Remove the default podman machine (if any)
podman machine rm

Then, basically run the PKG's postinstall steps in reverse:

sudo /opt/podman/bin/podman-mac-helper uninstall
sudo rm /etc/paths.d/podman-pkg
sudo rm -rfv /opt/podman

@masterkain
Copy link

masterkain commented Mar 19, 2023

that is not enough, podman broke my access to docker desktop, I had to rm /var/run/docker.sock, otherwise no amount of reboots/removals would work:

% docker run -d -p 80:80 docker/getting-started
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@thoke
Copy link

thoke commented May 10, 2023

What if one has installed Podman through Podman Desktop and not through brew?

Was anybody uninstall it when installed this way?

I had to remove it after Podman Desktop installed it, and I did this:

  1. Remove the default podman machine (if any)
podman machine rm

Then, basically run the PKG's postinstall steps in reverse:

sudo /opt/podman/bin/podman-mac-helper uninstall
sudo rm /etc/paths.d/podman-pkg
sudo rm -rfv /opt/podman

This is what helped me the most!

I was in the same boat where I used Podman Desktop, but have since moved on from it.

Here's what I did:

podman machine stop
podman machine rm
sudo podman-mac-helper uninstall
sudo rm /etc/paths.d/podman-pkg
sudo rm -frv /opt/podman

Then, I  removed Podman Desktop with my AppCleaner app.

@asmoura
Copy link

asmoura commented Jul 27, 2023

Additional step in macOS:
rm -fr ~/.local/share/containers/

@antun
Copy link

antun commented Oct 8, 2023

I think there's a step missing for podman-mac-helper. I'm trying to undo the changes that podman-mac-helper did. Before I installed it, the docker.sock looked like this:

/var/run/docker.sock -> /Users/antun/.docker/run/docker.sock

I just ran: sudo /usr/local/Cellar/podman/4.7.0/bin/podman-mac-helper uninstall, but the docker.sock is still pointing to the podman one:

/var/run/docker.sock -> /Users/antun/.local/share/containers/podman/machine/podman.sock

Not sure how to correct this.


UPDATE: I fixed this by opening Docker Desktop. It showed a message saying "another application changed your Docker settings", and gave me the option to "reapply configurations". That fixed docker.sock. Leaving this comment for anyone else who runs into it.

@sdavids
Copy link

sdavids commented Oct 24, 2023

I had to do the following:

$ sudo sfltool dumpbtm | grep pod
    #1: com.github.containers.podman.helper-dev
                 Name: podman-mac-helper
           Identifier: com.github.containers.podman.helper-dev
                  URL: file:///Library/LaunchDaemons/com.github.containers.podman.helper-dev.plist
      Executable Path: /usr/local/podman/helper/dev/podman-mac-helper
$ sudo /usr/local/podman/helper/dev/podman-mac-helper uninstall
$ sudo rm -rf /usr/local/podman
$ sudo rm /Library/LaunchDaemons/com.github.containers.podman.helper-dev.plist
$ sudo rm /var/run/podman-helper-dev.socket
$ sudo sfltool resetbtm
$ sudo reboot

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jan 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests