How to Convert All Your Snap Packages to Flatpak on Ubuntu Using Unsnap


For anyone looking to ditch Snap in favor of Flatpak, a new tool has surfaced to simplify this process. Let Jack Wallen introduce you to Unsnap.

Image: Mohamad Faizal/Adobe Stock

I’ll preface this by saying that I’m using Snap packages. I understand that there are many users who are completely against this universal packaging system for reasons such as Canonical’s hold on them and the reputation of being noticeably slower to launch than packages installed via the traditional method or via the competitor, Flatpak.

TO SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)

Whatever your reasons, if you fall into the anti-Snap camp, former Snap advocate (who once worked with Canonical), Alan Pope, has created a tool that makes it easy to convert all of your installed Snap packages to Flatpak. .

Unsnap is an open source command line utility that makes migrating from Snap to Flatpak incredibly easy. Understand, Unsnap is in alpha phase. I tested it on a fresh install of Ubuntu Desktop 22.04, where I installed a few additional Snap packages (specifically Spotify and Slack) to see how well it works. While the tool isn’t perfect (remember, it’s alpha), it only took a quick test to realize that Pope was working on something very handy.

Let’s see how to use Alan Pope’s Unsnap.

What you will need

To use the Unsnap tool, you will need a running instance of a Linux distribution that uses snap and a user with sudo privileges. That’s it. Let’s see how this magic tool works.

How to install dependencies

The first thing we need to do is install some quick dependencies. Log in to your Ubuntu system and run the command:

sudo apt-get install git Flatpak -y

Once this installation is complete, you are ready to download Unsnap and perform the conversion.

How to download Unsnap

Back in the terminal window, clone the Unsnap repository with:

git clone

Switch to the newly created directory with:

cd unsnap

The Unsnap process works like this:

  • Create a backup.
  • Install Flatpak (if not already on the system).
  • Activates the flat hub.
  • Installs Flatpaks for Snap packages that will be removed.
  • Deletes snapshot packages.
  • Remove snapd.

To run the entire process, run the command:

./unsnap auto

Depending on how many Snap packages you have installed, the process can take 1-10 minutes. On my test instance, Unsnap completed in less than a minute (I only had Firefox, Spotify, and Slack installed).

At first glance, my test results weren’t too promising, but remember this is an alpha tool running on a beta version of Ubuntu. Yes, Unsnap removed all Snap packages and even installed the equivalent Flatpak apps (discovered with the command Flatpak list). However, launching these Flatpak-installed apps initially proved a challenge. Flatpak versions of apps were not listed in the app overview menu, nor would they start from the command line. However, after a quick reboot of the machine, everything was exactly as expected, and Firefox, Slack, and Spotify were all ready to go (Figure A).

Figure A

As you can see, Firefox, Slack, and Spotify were all installed via Flatpak.
As you can see, Firefox, Slack, and Spotify were all installed via Flatpak.

And that’s all there is to Unsnap. If you’re not happy with the state of Snap, but still want to use a distro like Ubuntu, Alan Pope has you covered. Remember that this tool is very much in alpha, so you’ll want to test it on non-production machines first, before diving in with your daily drivers.

Subscribe to TechRepublic How to make technology work on YouTube for all the latest tech tips for professionals from Jack Wallen.

Source link

Steven L. Nielsen