Snap and Flatpak packages both provide a way to install and run modern applications on Linux Mint 21.3 without worrying about dependency issues or outdated repositories. Each system has its own strengths: Snap offers automatic background updates and cross-distribution support, while Flatpak emphasizes open-source principles and tight integration with Mint's native tools. Setting up both package managers gives you access to a broader range of applications and simplifies software management, especially when certain tools are unavailable through traditional APT repositories.
Installing and Configuring Flatpak on Linux Mint 21.3
Flatpak is typically pre-installed on recent versions of Linux Mint, but you may need to upgrade or manually install it to access the latest features and bug fixes. Using the official Flatpak PPA ensures you receive the most up-to-date version, which is especially important for compatibility with newer applications and security improvements.
Step 1: Update your package lists and existing packages. This ensures that all dependencies required by Flatpak are current and reduces the risk of conflicts.
sudo apt update
sudo apt upgrade
Step 2: Add the official Flatpak PPA repository. This step is necessary if you want the latest Flatpak release, as the default Mint repositories may not always provide the newest version.
sudo add-apt-repository ppa:flatpak/stable -y
Step 3: Update your package lists again to include packages from the newly added PPA.
sudo apt update
Step 4: Install or upgrade Flatpak from the updated repository. This will pull in the latest Flatpak version and any required dependencies.
sudo apt install flatpak
Step 5: Verify the Flatpak installation by checking its version. This confirms that the correct version is installed and operational.
flatpak --version
Step 6: Add the Flathub repository. Flathub is the central hub for Flatpak applications and provides access to thousands of up-to-date packages.
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Step 7: (Optional) Restart your system to ensure all Flatpak integrations (such as menu entries and desktop integration) are properly loaded, especially after a fresh installation or major upgrade.
Managing Applications with Flatpak
Flatpak uses a unique application ID system, so you’ll need to know the correct ID when installing or managing apps. Here are the most common commands:
- Search for applications:
flatpak search <application-name>
- Install an application:
flatpak install flathub <application-ID>
- Run an application:
flatpak run <application-ID>
- Update all Flatpak apps:
flatpak update
- List installed Flatpak applications:
flatpak list --app
- Uninstall an application:
flatpak uninstall <application-ID>
- Repair Flatpak installation:
flatpak repair
Flatpak applications run in a sandboxed environment, increasing system security by isolating apps from core system files. Advanced users can fine-tune permissions using tools like Flatseal, a Flatpak application that provides a graphical interface for managing app permissions.
To remove Flatpak completely, use:
sudo apt autoremove flatpak --purge -y
Enabling and Using Snap Packages on Linux Mint 21.3
Linux Mint disables Snap support by default to prioritize Flatpak and maintain package transparency. However, enabling Snap allows you to install software that may not be available as Flatpak or APT packages, such as certain proprietary or cross-distribution apps. Snap provides automatic background updates and a consistent experience across different Linux distributions.
Step 1: Remove the Snap block file. Linux Mint uses a configuration file to prevent Snap installation. Deleting or renaming this file is required to proceed.
sudo rm /etc/apt/preferences.d/nosnap.pref
Alternatively, rename it as a backup:
sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap.pref.backup
Step 2: Update your package lists to reflect the removal of the Snap block and ensure all repositories are current.
sudo apt update
Step 3: Install the Snap daemon (snapd
). This service manages Snap packages on your system.
sudo apt install snapd
Step 4: Enable and start the Snap service. This ensures that Snap is running immediately and will start automatically on reboot.
sudo systemctl enable --now snapd.service
Check the service status if needed:
systemctl status snapd.service
Step 5: (Optional) Install the Snap core package. This package provides the basic runtime environment required by many Snap applications.
sudo snap install core
Step 6: Test the Snap installation by installing a simple Snap package, such as hello-world
. Running this package confirms that Snap is working correctly.
sudo snap install hello-world
hello-world
If you see Hello World!
as output, Snap is functioning as expected.
Step 7: (Optional) Install the Snap Store graphical interface for easier browsing and installation of Snap packages.
sudo snap install snap-store
You can then launch the Snap Store from your application menu under Administration.
Managing Snap Packages
- Find packages:
snap find <package-name>
- Install a package:
sudo snap install <package-name>
- Remove a package:
sudo snap remove <package-name>
- Update all Snap packages:
sudo snap refresh
- List installed Snap packages:
sudo snap list
Snaps are automatically updated in the background, so you always have the latest version without manual intervention. However, you can manually refresh or roll back packages as needed.
To completely remove Snap and all installed Snap applications:
sudo apt autoremove snapd
If you wish to re-block Snap installation, recreate the nosnap.pref
file:
sudo tee /etc/apt/preferences.d/nosnap.pref <
Troubleshooting and Maintenance Tips
Flatpak and Snap both operate independently from the traditional APT system. If you encounter issues such as missing menu entries, check that the relevant desktop integration packages are installed (gnome-menus
for Flatpak/Snap, or desktop environment-specific plugins). If Snap or Flatpak apps do not launch, verify that their respective services are running and up to date.
Disk space usage may increase, especially with Flatpak, because each application may require its own runtime environment. Use flatpak uninstall --unused
or snap remove <package-name>
to clear unused packages and free up space.
Some applications, particularly those involving system integration or hardware access, may require additional permissions. For Flatpak, adjust permissions with Flatseal or the flatpak override
command. For Snap, review the package’s documentation for any required classic confinement or interface connections.
Both Snap and Flatpak can coexist with APT packages, allowing you to choose the best source for each application based on compatibility, update frequency, and system integration needs.
Configuring Snap and Flatpak on Linux Mint 21.3 gives you flexible access to a wide range of applications, automatic updates, and improved security through sandboxing. Regularly update both package managers to keep your software current and your system running smoothly.
Member discussion