Skip to content

Instantly share code, notes, and snippets.

@david30907d
Last active August 17, 2025 01:19
Show Gist options
  • Save david30907d/d15546e89dd0a66a78db1bda2bf93328 to your computer and use it in GitHub Desktop.
Save david30907d/d15546e89dd0a66a78db1bda2bf93328 to your computer and use it in GitHub Desktop.
docker system prune -a --volumes
rm -rf ~/.cache  ~/.npm ~/.yarn ~/.gradle
yarn cache clean
@david30907d
Copy link
Author

cronjob:

#!/bin/bash

echo "🧹 Cleaning mobile app build & local caches..."

# 專案內部快取與編譯產物
find . -type d -name "build" -exec rm -rf {} +
rm -rf ios/build android/build ios/Pods node_modules

# Flutter 清理(如有)
if command -v flutter &> /dev/null; then
  flutter clean
  flutter pub cache clean
fi

# 全域工具快取
rm -rf ~/.npm/_cacache
rm -rf ~/.gradle/caches
rm -rf ~/.cache/yarn/v6
yarn cache clean

echo "✅ Done!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment