windows subsystem for linux – How to recover from accidentally deleting Snap from Ubuntu installed as a part of WSL1?
Seems like you stuck in a “deadlock” apt can’t run because snap is missing, and snap can’t be reinstalled because apt won’t run.
You need to remove the broken apt first!
- disable snap apt hook
sudo ls /etc/apt/apt.conf.d/ | grep -i snap
# something like: 20snapd.conf, otherwise adjust follow up
sudo mv /etc/apt/apt.conf.d/20snapd.conf /tmp/20snapd.conf.bak
- fix broken pkg
sudo apt --fix-broken install
- remove snap
sudo apt purge snapd
sudo apt autoremove
Read more here: Source link
