pwaclean is a cross-platform command-line utility for FirefoxPWA (PWAsForFirefox). Rewritten in Python, this project helps you scan, clean, and manage cache files from your Progressive Web App (PWA) profiles to reclaim disk space and keep your system running smoothly.
- Cross-Platform Support: Works seamlessly on Windows, macOS, and Linux, without relying on external Bash dependencies like
jq. - Intelligent Profile Scanning: Detects and displays all FirefoxPWA profiles, showing the size of their cache and the associated apps.
- Interactive and Automated Cleaning: Choose to clean specific profiles interactively or use command-line flags to clear all cache automatically.
- Empty Profile Management: Safely identifies and allows you to remove profiles that no longer have installed apps or cached data, using the official
firefoxpwatool. - Dry Run Mode (
--dry-run): Simulates the cleanup process without deleting any files, so you can see what would be removed. - Customizable Cleanup: You can easily customize which directories are targeted for cleaning by editing the
CLEAN_DIRSvariable in the script.
- Python 3.6+: The script is written in Python and is platform-independent.
- FirefoxPWA: The script requires Firefox PWA to be installed on your system.
pwaclean is a single-file Python script that works on Linux, Windows, and macOS.
git clone https://github.com/dmnmsc/pwaclean.git cd pwacleanYou can run it directly with Python:
python pwaclean.pyOr make it executable (Linux/macOS):
chmod +x pwaclean.py ./pwaclean.pyFor easier access on Linux/macOS:
sudo mv pwaclean.py /usr/local/bin/pwaclean pwacleanOn Windows, you can:
- Move
pwaclean.pyto a folder included in your system's PATH. - Optionally rename it to
pwaclean.pyorpwaclean.exeif bundled withpyinstaller.
💡 Tip (Windows): Use
python pwaclean.pyunless.pyfiles are associated with Python in your system. You can check this by double-clicking the script — if it opens in Python, you're good to go.
| Option | Shorthand | Description |
|---|---|---|
--yes | -y | Skips all confirmation prompts. |
--all | -a | Cleans all profiles without needing to select. |
--yes-all | -ya | Combines --yes and --all for full automation. |
--dry-run | Simulates cleanup without deleting any files. | |
--empty | -e | Removes empty profiles (no apps or cache). |
--table | -t | Displays profiles in a formatted table. |
--help | -h | Shows the full help message. |
Clear all cache automatically:
pwaclean --yes-allSimulate removing empty profiles:
pwaclean --dry-run --emptyDisplay profiles in a table format:
pwaclean --tableWhen prompted, you can enter:
- Numbers (e.g.,
1 2 4) to clean specific profiles. aor*to clean all profiles.nto do nothing and exit.
$ ./pwaclean.py -y 🔍 Scanning FirefoxPWA profiles and cache... 1) YouTube (K5G74N): 124M 2) Twitter (F4D21P): 98M 3) Work Tools (A9Q31T): 300M — 3 apps - Slack - Trello - Notion 📦 Total removable cache: 522M Enter numbers to clean (e.g. 1 3 5, 'a' for all, 'n' for none): 1 3 🧹 Cleaning selected apps caches... ✔ YouTube cleaned ✔ Work Tools cleaned ✅ Total cache cleared: 424M- Cache vs. Data: The script only removes temporary cache files. Your app configurations and data remain intact.
--emptyflag: This is a specialized option for deleting profiles that have no apps or cache data. It does not perform cache cleaning.- Profile Deletion: Profile removal is handled directly by
firefoxpwa profile removefor a safer and official method.
This project is licensed under the GNU GENERAL PUBLIC LICENSE. See the LICENSE file for details.
Created by dmnmsc. Feel free to open issues or contribute!