204

I used this command line

sudo snap install pwgen-tyhicks

to install pwgen but I can't findout how to use it. So I want to uninstall it. How to uninstall it?

UbuntuLover
  • 2,679
  • 3
  • 11
  • 15

3 Answers3

275
sudo snap remove pwgen-tyhicks

From documentation:

Prior to removal (except on Ubuntu Core systems), a snap’s internal user, system, and configuration data is saved as a snapshot (snapd 2.39+), and retained for 31 days. A snapshot can be used to restore the state of your snap upon reinstallation.

Pablo Bianchi
  • 15,657
guiverc
  • 30,396
30

Purge

Use sudo snap remove --purge snapname to completely remove a snap package, including all of its revision loop drives. Only by doing so, will the hard drive space be made available again, as demonstrated below for the snap package firefox.

$ lsblk
NAME     TYPE   SIZE    MODEL    SERIAL    WWN    MOUNTPOINT
…
loop6    loop  70.4M                              /snap/core22/275
loop7    loop 176.9M                              /snap/firefox/1810
loop8    loop 178.4M                              /snap/firefox/1860
loop9    loop 346.3M                              /snap/gnome-3-38-2004/115
…
$ snap list
Name       Version    Rev    Tracking         Publisher    Notes
firefox    105.0-2    1860   latest/stable    mozilla✓     -

Here is the command that performs the purge:

$ sudo snap remove --purge firefox
$ lsblk
NAME     TYPE   SIZE    MODEL    SERIAL    WWN    MOUNTPOINT
…
loop6    loop  70.4M                              /snap/core22/275
loop9    loop 346.3M                              /snap/gnome-3-38-2004/115
…
Serge Stroobandt
  • 5,268
  • 1
  • 48
  • 59
9
sudo snap remove pwgen-tyhicks --purge

Uninstall completely

  • After using snap remove --purge the app is still in my launcher but its icon is gone, and it still works when I click on its empty box. It doesn't appear in the snap list list either. Anyone have any ideas? – Keiva Dec 29 '23 at 00:24