How To Uninstall Flatpak: The Complete Guide To Removing Applications And The Entire Framework

How To Uninstall Flatpak: The Complete Guide To Removing Applications And The Entire Framework

How to delete flatpak? - Fedora Discussion

To uninstall a specific Flatpak application, execute the system command flatpak uninstall followed by the specific application identifier, and then purge residual runtimes using the flatpak uninstall --unused utility. To completely remove the entire Flatpak framework and all associated application data from a Linux distribution, run the package manager purge command for your operating system and manually delete the remaining system-wide and user-specific storage directories.

Pre-Removal Assessment and Dependency Mapping

Flatpak utilizes a highly containerized sandboxing environment that separates your applications from the host operating system. Because it operates independently of standard system library trees, uninstalling applications or the framework itself requires a methodical approach to ensure that orphan runtimes, user configuration files, and cached data are completely cleared from your storage drives.

Before executing any commands, it is crucial to understand the scope of your target environment. Flatpaks can be installed either system-wide (accessible by all users and managed with root privileges) or user-specific (accessible only to the installing user and managed without administrative privileges). Identifying which level you are working with determines whether you need to prepend administrative commands or point directly to localized directories.



Pre-Removal Checklist and Benchmarks



  • Essential Administrative Tools: A standard Linux terminal emulator (such as GNOME Terminal, Konsole, or Alacritty) with administrative privileges (sudo or root access) for system-level removals.
  • Target Directory Knowledge: Location of user configurations (typically located in the hidden directory ~/.var/app) and system-wide installation directories (typically located in /var/lib/flatpak).
  • Package Manager Frameworks: Familiarity with your distribution's native package manager (APT for Debian/Ubuntu, DNF for Fedora, Pacman for Arch Linux) if you are removing the core Flatpak service.
  • Estimated Duration: 3 to 5 minutes for targeted application removal; 10 to 15 minutes for complete framework eradication and manual filesystem purging.
  • Financial/Resource Cost: Fully open-source; the only investment is the local storage capacity reclaimed by removing heavy, sandboxed runtimes (which often ranges from 500 megabytes to several gigabytes per runtime).

Systematic Execution Guide for Flatpak Removal

This multi-step guide provides a detailed operational procedure for identifying, dismantling, and removing individual Flatpaks, cleaning up orphaned dependencies, and completely uninstalling the underlying Flatpak runtime daemon from your Linux system.



Step 1: Identifying Installed Applications and Shared Runtimes

To safely remove any Flatpak, you must first obtain its exact Application ID. Unlike traditional packages which might use simple names like "gimp" or "vlc", Flatpaks use a reverse-DNS naming convention, such as org.gimp.GIMP or org.videolan.VLC.

Open your terminal emulator and execute the command flatpak list --app to generate a clean, readable index of all installed user and system-space applications. This output displays the application name, application ID, version branch, and installation source (such as Flathub).

If you want to view all installed components, including the heavy shared runtimes and software development kits (SDKs) that back these applications, execute flatpak list. Take note of the specific Application IDs you intend to remove, as using the common application name in subsequent commands will result in execution errors.



Step 2: Purging Targeted Flatpak Applications

Once you have identified the exact Application ID, you can execute the target removal process. To remove a specific application, type the command flatpak uninstall followed by a space and the exact application ID. For example, to remove the VLC media player, enter:

flatpak uninstall org.videolan.VLC

During the execution, the system will calculate the dependency tree and prompt you for verification. Press Y and hit Enter to confirm the uninstallation.

Pro-Tip: If you have the same application installed both system-wide and for a specific user, you must append flags to target the correct instance. Use the command flatpak uninstall --user org.videolan.VLC to target the user space, or flatpak uninstall --system org.videolan.VLC to target the root system space.



Step 3: Clearing Orphaned Runtimes and Shared Libraries

A common pitfall of uninstalling Flatpaks is leaving behind deep dependency trees. Flatpak applications rely on massive shared runtime environments, such as the GNOME Platform or Freedesktop Platform. When you uninstall an application, these underlying runtimes often remain on your storage drive, acting as massive, orphan file clusters.

To automatically scan your system for these unused libraries and eliminate them, run the unused utility command:

flatpak uninstall --unused

This engine evaluates your remaining installed Flatpaks, maps their dependencies, and lists any runtimes that are no longer actively linked to an application. Confirm the prompt to reclaim significant blocks of disk space.

Warning: Do not skip the unused-cleanup command. Leaving unlinked runtimes on your system will not cause software conflicts, but it can permanently lock up several gigabytes of drive space on SSD partitions with limited write cycles.



Step 4: Deleting Residual Configuration Data and Cache Directories

The standard uninstall command only removes the binaries, runtimes, and immediate desktop integration links of the target application. Your personal settings, user profiles, login tokens, and cached files remain completely untouched inside your home directory to allow for easy restoration if you reinstall the software later.

To manually purge these residual system footprints, navigate to the user-specific storage directory by executing cd ~/.var/app.

Inside this directory, list the folders. You will find directories named after the exact Application IDs of your deleted software. To completely destroy all configurations and stored local data for a specific removed application, run the recursive delete command:

rm -rf ~/.var/app/org.videolan.VLC

Make sure to replace the final directory path with the exact Application ID folder of the software you just uninstalled.



Step 5: Completely Dismantling the Flatpak Framework Daemon

If you wish to completely discontinue using Flatpak on your system, you must remove the core Flatpak service, systemd daemons, environmental paths, and package repositories. This requires utilizing your Linux distribution's native package manager.

For Debian, Ubuntu, Linux Mint, and Pop!_OS systems, execute:

sudo apt purge flatpak

Using the purge command rather than the standard remove command is essential, as it ensures all system configuration files associated with the Flatpak daemon are permanently deleted from the host system.

For Fedora or Red Hat Enterprise Linux systems, execute:

sudo dnf remove flatpak

For Arch Linux, Manjaro, or EndeavourOS systems, execute the recursive dependency removal sequence:

sudo pacman -Rns flatpak

Finally, execute a terminal reboot command to clear all lingering environment variables, session paths, and system-wide configurations from active memory.


How To Install Flatpak On Ubuntu 20.04 LTS - Eldernode Blog

How To Install Flatpak On Ubuntu 20.04 LTS - Eldernode Blog

System Storage and Removal Architecture Metrics

When managing or dismantling a Flatpak environment, the amount of physical space reclaimed varies widely depending on the clean-up depth. The following table provides a breakdown of different uninstallation tiers, where the files reside, the primary commands used, and their performance and storage impacts.



Uninstallation Tier Target Storage Path Execution Command Storage & Performance Impact
Standard Application Removal /var/lib/flatpak/app/ or ~/.local/share/flatpak/app/ flatpak uninstall [Application ID] Removes application binaries, shortcuts, and metadata. Frees roughly 50MB to 500MB of storage space.
Orphan Dependency Purge /var/lib/flatpak/runtime/ or ~/.local/share/flatpak/runtime/ flatpak uninstall --unused Destroys dangling runtime environments (such as GNOME SDKs). Reclaims 500MB to 4GB of critical storage space.
User Profile Configuration Purge ~/.var/app/ rm -rf ~/.var/app/[Application ID] Permanently destroys local caches, personal configurations, and app state. Reclaims 10MB to 20GB (dependent on cache size).
Complete Daemon Eradication /etc/flatpak/, /var/lib/flatpak/, and system packages sudo apt purge flatpak (or OS equivalent) Disables flatpak system services, clears repositories (remotes), and prevents sandboxed execution overhead.

Troubleshooting Common Flatpak Removal Failures

Even with standard uninstallation workflows, the containerized nature of Flatpak can occasionally result in broken states, file locking conflicts, or lingering system integrations. Below are typical failure scenarios and their technical remedies.



Scenario 1: Uninstallation Blocked by Active Ref-Counting or Dependency Locks



  • Root Cause: The Flatpak package manager registers that a runtime or application is currently requested by an active process, background daemon, or concurrent sub-installation, causing it to block the standard uninstallation request.
  • Actionable Fix: Force the removal by appending the force flag to bypass active reference checking. Run the command flatpak uninstall --force-remove [Application ID]. If this still fails, identify running sandbox processes by running flatpak ps, and kill the active sandboxed processes using the command flatpak kill [Application ID] before attempting the uninstallation sequence again.


Scenario 2: Orphaned Desktop Icons and Broken MIME Types Persist in App Menu



  • Root Cause: The host system's desktop environment fails to update its local MIME type database or desktop entry cache after a Flatpak is uninstalled, leaving behind broken shortcuts that point to non-existent executables.
  • Actionable Fix: Trigger a manual re-index of the user's application menu structure. Run the commands update-desktop-database ~/.local/share/applications and xdg-desktop-menu forceupdate in your terminal window to clean up stale menu items and broken icon associations.


Scenario 3: Execution Directory Lockouts Due to Mismatched User Permissions



  • Root Cause: An application was originally installed with root parameters (system-wide) but an uninstallation attempt is initiated from a standard user session without root privilege flags, generating a permission denied error.
  • Actionable Fix: Elevate your execution environment by prefixing the uninstallation command with administrative credentials, or direct the Flatpak engine specifically to the system-wide repository. Run sudo flatpak uninstall [Application ID] to cleanly remove system-wide installations.

Frequently Asked Questions



Does removing a Flatpak application delete my personal application settings and saved files?

No. Standard uninstallation commands only delete the application binaries and associated system links. Your personal profiles, custom settings, and application caches are kept safe in your home directory inside the ~/.var/app/ path. If you want these files removed permanently, you must delete that specific directory manually.



What is the difference between flatpak uninstall and flatpak remove?

There is no difference in functionality. The Flatpak command-line utility treats both uninstall and remove as identical aliases. Both commands invoke the exact same process to safely remove a target application or runtime from your Linux machine.



How do I remove a custom Flatpak remote repository like Flathub?

To remove an added remote repository, check your active remotes by running flatpak remotes. Once you identify the target remote repository name, remove it by executing the command flatpak remote-delete followed by the name of the remote (for example, flatpak remote-delete flathub).



Can I uninstall Flatpak system-wide but keep my user-specific configurations?

Yes. You can uninstall the system package manager components of Flatpak while preserving your user configuration directory located at ~/.var/app/. If you reinstall Flatpak later, the applications will automatically reconnect to your previous configuration data upon their next installation.

Optimize Your Linux Environment for Peak Performance

Effectively managing sandboxed applications and purging bloated runtimes is essential for maintaining a fast, clean Linux deployment. If you need advanced assistance configuring systems, setting up scalable infrastructure, or deploying optimized Linux-based environments, contact our technical team today to schedule an architecture consultation.


How to Update Flatpak Packages

How to Update Flatpak Packages

Read also: How to Access Herman Kinn Funeral Home Obituaries and Honor Local Legacies with Care
close