Skip to content

Instantly share code, notes, and snippets.

@rennokki
Last active November 17, 2024 18:19
Show Gist options
  • Save rennokki/6b2e191de8bbff99e4f604527a94ee2c to your computer and use it in GitHub Desktop.
Save rennokki/6b2e191de8bbff99e4f604527a94ee2c to your computer and use it in GitHub Desktop.

Revisions

  1. rennokki revised this gist Nov 17, 2024. 1 changed file with 17 additions and 1 deletion.
    18 changes: 17 additions & 1 deletion cleanup.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    #!/bin/bash

    # Software Update
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    softwareupdate -i -a --force --agree-to-license
    sudo softwareupdate -i -a -R --force --agree-to-license

    # Brew
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    brew upgrade --greedy --force
    brew cleanup
    rm -rf $(brew --cache)
    @@ -17,16 +19,30 @@ brew autoremove
    brew doctor

    # npm
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    npm i -g npm
    npm update -g
    npm cache clean --force

    # pnpm
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    pnpm add -g pnpm
    pnpm up --global --latest
    pnpm store prune
    rm -rf $(pnpm store path)

    # yarn
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    yarn global upgrade
    yarn cache clean
    yarn cache clean

    # python
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    pip install -U `pip list --outdated | awk 'NR>2 {print $1}'`
    pip-review --local --interactive
    pip cache purge

    # docker
    # https://gist.github.com/cdeath/dcc57de4d0bbc1d4e0cbb9c167d9a662
    docker stop $(docker ps -a -q)
    docker system prune -a
  2. rennokki renamed this gist Nov 17, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. rennokki created this gist Nov 17, 2024.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #!/bin/bash

    # Software Update
    softwareupdate -i -a --force --agree-to-license
    sudo softwareupdate -i -a -R --force --agree-to-license

    # Brew
    brew upgrade --greedy --force
    brew cleanup
    rm -rf $(brew --cache)

    brew uninstall --zap {cask}
    brew leaves
    brew deps --tree --installed

    brew autoremove
    brew doctor

    # npm
    npm i -g npm
    npm update -g
    npm cache clean --force

    # pnpm
    pnpm add -g pnpm
    pnpm up --global --latest
    pnpm store prune
    rm -rf $(pnpm store path)

    # yarn
    yarn global upgrade
    yarn cache clean