How to Remove a Snap Package from Ubuntu 23.04

How to Remove a Snap Package from Ubuntu 23.04

Snap packages are a way of packaging applications with all their dependencies in a containerized format that can run on any Linux device. They are designed to be secure, scalable, and easy to update.

However, some users may prefer to use traditional packages or have issues with snap packages, such as performance, disk space, or compatibility. In this article, we will show you how to remove a snap package from Ubuntu 23.04 and how to remove snap completely if you wish.

Removing a Snap Package

You can use the snap command with the option to remove a snap package from your system. For example, to remove the vlc snap package, you can run the following:

sudo snap remove vlc

This will uninstall the snap package and free up the disk space it was using. You can also use the Snap Store app to remove snap packages graphically by clicking on the Installed tab and then clicking on the Remove button next to the snap package you want to uninstall.

Removing Snap Completely

Warning: Note that removing snap will remove your Ubuntu Store and Firefox and may completely affect some applications that depend on it or are only available as snap packages. You may need to find alternative ways of installing or running those applications if you still need them.

If you want to remove snap completely from your system, you need to uninstall all the snap packages first, as well as the snapd service and the snap command.

To do this, you can run the following:

sudo snap remove $(snap list | awk '{print $1}' | tail -n +2)
sudo apt purge snapd

This will remove all the snap packages and the snap daemon from your system. You may also want to remove any leftover files or directories related to snap by running the following command:

sudo rm -rf /var/cache/snapd /var/lib/snapd /var/snap /snap /etc/profile.d/apps-bin-path.sh

Conclusion

In this article, we have shown you how to remove a snap package from Ubuntu 23.04 and how to remove snap completely if you wish. We hope this article was helpful and informative.