Skip to content

Instantly share code, notes, and snippets.

@1player
1player / list-unused-flatpak-directories.sh
Created June 14, 2022 09:14
Show all unused ~/.var/app directories from uninstalled Flatpaks, and their size
#!/bin/bash
set -euo pipefail
base_dir=$(realpath $HOME/.var/app --relative-to=$(pwd))
comm -13 <(flatpak list --columns=application | sort) <(ls -1 $HOME/.var/app/ | sort) \
| sed "s#^#$base_dir/#" | tr '\n' '\0' | du -sch --files0-from=-