I’m going to preface this by saying I use Snap packages. I understand there are a lot of users out there who are completely against this universal packaging system for reasons such as Canonical’s stranglehold on them and a reputation for being noticeably slower to launch than packages installed via the traditional method or via the competitor, Flatpak.
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 it incredibly easy to migrate from Snap to Flatpak. Do understand, Unsnap is very much in alpha stages. I’ve tested it on a fresh install of Ubuntu Desktop 22.04, in which I installed a couple of extra Snap packages (specifically Spotify and Slack) to see just how well this works. Although the tool isn’t perfect (remember, it’s alpha), it only took a quick test to realize Pope was working on something pretty handy.
Let’s see how to make use of Alan Pope’s Unsnap.
What you’ll need
To use the Unsnap tool you’ll 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 magical tool works.
How to install the dependencies
The first thing we need to do is install a few quick dependencies. Log into your Ubuntu system and issue the command:
sudo apt-get install git Flatpak -y
Once that installation completes, you’re ready to download Unsnap and make the conversion.
How to download Unsnap
Back at the terminal window, clone the Unsnap repository with:
git clone https://github.com/popey/Unsnap
Change into the newly created directory with:
The Unsnap process works like this:
- Creates a backup.
- Installs Flatpak (if it’s not already on the system).
- Enables flathub.
- Installs the Flatpaks for the Snap packages that will be removed.
- Removes snap packages.
- Removes snapd.
To run the entire process, issue the command:
Depending on how many Snap packages you have installed, the process can take anywhere from 1 to 10 minutes. On my test instance, Unsnap completed in less than a minute (I only had Firefox, Spotify and Slack installed).
At first blush, my test results weren’t exactly promising, but remember this is an alpha tool running on a beta release of Ubuntu. Yes, Unsnap removed all of the Snap packages and even installed the equivalent Flatpak applications (discovered with the command
Flatpak list). However, launching those Flatpak-installed applications proved to initially be a challenge. The Flatpak versions of the apps weren’t in the Applications overview menu, nor would they start from the command line. However, after a quick reboot of the machine, all was exactly as expected, and Firefox, Slack and Spotify were all ready to go (Figure A).
And that’s all there is to using Unsnap. If you’re not happy with the state of Snap, but still want to use a distribution like Ubuntu, Alan Pope has your back. Just remember, this tool is very much in alpha, so you’ll want to test it first on non-production machines, before diving in with your daily drivers.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.