Skip to content

Commit

Permalink
Merge pull request #87 from AstroOrbis/main
Browse files Browse the repository at this point in the history
More things!
  • Loading branch information
fwartner authored Jul 28, 2021
2 parents a5e5ba9 + 90c1805 commit ac06a1b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ Temporary Items
.apdisk

.env
.idea
.idea
.vscode
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ A cleanup script for macOS that runs the following tasks:
* Remove Lunar Client logs and cache
* Remove Wget logs and hosts
* Clear Bash/ZSH history
* Removes Cacher logs
* Deletes Android caches
* Clears Gradle caches
* Deletes Kite logs

## Install Automatically

Expand Down Expand Up @@ -87,12 +91,6 @@ FLAGS:
-n no brew updates
```

Clean up without homebrew updates:

```
$ mac-cleanup -n
```

## Contributors

### Code Contributors
Expand Down
32 changes: 32 additions & 0 deletions mac-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@ msg 'Clearing System Cache Files...'
sudo rm -rfv /Library/Caches/* &>/dev/null
sudo rm -rfv /System/Library/Caches/* &>/dev/null
sudo rm -rfv ~/Library/Caches/* &>/dev/null
sudo rm -rfv /private/var/folders/bh/*/*/*/* &>/dev/null

msg 'Clearing System Log Files...'
sudo rm -rfv /private/var/log/asl/*.asl &>/dev/null
sudo rm -rfv /Library/Logs/DiagnosticReports/* &>/dev/null
sudo rm -rfv /Library/Logs/CreativeCloud/* &>/dev/null
sudo rm -rfv /Library/Logs/Adobe/* &>/dev/null
sudo rm -fv /Library/Logs/adobegc.log &>/dev/null
rm -rfv ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/* &>/dev/null
rm -rfv ~/Library/Logs/CoreSimulator/* &>/dev/null

Expand Down Expand Up @@ -238,6 +241,35 @@ msg 'Clearing Bash/ZSH history...'
rm -fv ~/.bash_history &>/dev/null
rm -fv ~/.zhistory &>/dev/null

# Deletes Cacher logs
# I dunno either
# -Astro
if [ -d ~/.cacher ]; then
msg 'Deleting Cacher logs...'
rm -rfv ~/.cacher/logs
fi

# Deletes Android (studio?) cache
# -Astro
if [ -d ~/.android ]; then
msg 'Deleting Android cache...'
rm -rfv ~/.android/cache
fi

# Clears Gradle caches
# -Astro
if [ -d ~/.gradle ]; then
msg 'Clearing Gradle caches...'
rm -rfv ~/.gradle/caches
fi

# Deletes Kite Autocomplete logs
# -Astro
if [ -d ~/.kite ]; then
msg 'Deleting Kite logs...'
rm -rfv ~/.kite/logs
fi

if type "brew" &>/dev/null; then
if [ "$update" = true ]; then
msg 'Updating Homebrew Recipes...'
Expand Down

0 comments on commit ac06a1b

Please sign in to comment.