October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Manage Flatpak Build Caches and Free Disk Space

Flatpak builder state, installed runtimes, build output, and app-private caches are different things. Identify the large directory before choosing a cleanup method.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Flatpak disk usage can come from several different places, and they need different cleanup actions. For build data, remove the relevant .flatpak-builder state directory when you can accept a full rebuild. For unused installed runtimes and extensions, use flatpak uninstall --unused. An app’s private cache is separate and should be assessed on an app-by-app basis.

First identify what is using the space

“Flatpak cache” can mean different things. Before deleting anything, locate the large directory and match it to the data it contains:

As an Amazon Associate I earn from qualifying purchases.

  • Builder state: Project build data, including downloads, build directories, and cached build results. By default, flatpak-builder keeps it in .flatpak-builder under its state directory, which defaults to the current working directory.
  • Build output: The target directory containing the output of a build. This is separate from the builder’s state directory.
  • Installed refs: Runtimes and extensions installed for Flatpak apps. These are not builder cache.
  • App-private cache: Data maintained for an individual app, typically under ~/.var/app/<app-id>/cache.

The amount you can recover depends on the contents of your own machine; the Flatpak documentation does not establish a typical reclaimable amount.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove flatpak-builder state when you can rebuild

To clear build state, remove the .flatpak-builder directory associated with the project, or the custom state directory used for that build. Flatpak Builder’s command reference says: “It is safe to remove the state directory. This will force a full build the next time you build.” You lose incremental-build benefits, so the next build must recreate the state.

#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

If you chose a custom location with --state-dir=PATH, clean that location rather than assuming the default directory is in use. The configured state path must be on the same filesystem as the build target directory.

Choose the right cleanup behavior for future builds

Clear the previous build target with --force-clean

Run flatpak-builder with --force-clean when you want it to erase the previous contents of the build target directory before building. This is not the same as deleting builder state. Since flatpak-builder 1.4.6, the option refuses to delete a target directory if it is the current working directory, the state directory, or a parent of either.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Delete module directories to save space

By default, failed build directories are retained and successful ones are removed. The --delete-build-dirs option tells the builder to remove source and build directories after each module, including when a module fails. This can reduce retained build files, but leaves less material to inspect when debugging a failed module.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Builder options can differ across installed versions. Check flatpak-builder --help or the manual for your installed version before relying on an option, particularly on distributions with an older builder.

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Uninstall runtimes and extensions that are no longer used

To remove installed runtimes and extensions that no installed apps use, inspect the proposed removals and then run:

flatpak uninstall --unused

This cleans unused installed refs; it does not clear flatpak-builder state. Use flatpak repair only when addressing inconsistencies in a local Flatpak installation. It is not documented as a general-purpose cache cleaner.

Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Treat an app’s private cache separately

Flatpak sets an app’s XDG_CACHE_HOME to ~/.var/app/<app-id>/cache. That location belongs to the app, not flatpak-builder. The path alone does not establish whether deleting its contents is harmless: behavior depends on the app. Check the app’s documentation or settings before removing its cache, and do not treat this directory as a universal Flatpak cleanup target.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

For maintainers: reduce files shipped in the app

If you maintain a Flatpak, manifest cleanup patterns and cleanup-commands can remove files produced during the build. This changes what goes into the built application; it does not clear a user’s existing builder state. The Flatpak documentation also notes that avoiding unnecessary components in the build is often preferable to relying on extensive cleanup.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400) | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue | Everyday HDD storage. Plug-and-play backup. Windows & macOS. Adobe CC trial included. 1-Year Warranty
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.