Created
June 14, 2022 09:14
-
-
Save 1player/ca926a7e7c6a4d4e1b7de5e41f32c949 to your computer and use it in GitHub Desktop.
Show all unused ~/.var/app directories from uninstalled Flatpaks, and their size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment