diff --git a/README.md b/README.md index d8ee9aa..c96bd45 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ When you don't really need any extra software rather than core functions of Ubun Github Actions give you a 84GB storage drive which is loaded up to 56GB with lots of programs inbuilt. That gives you only 29GB playground. -But with this action, you can gain up to 76GB! That means around 47GB can be freed! +But with this action, you can gain up to 77GB! That means around 48GB can be freed! >More space can be gained. Work is undergoing to achieve that. ## *Requirement* @@ -39,15 +39,15 @@ steps: The main programs removed by this action are - ```text - adoptopenjdk-11 & adoptopenjdk-8 -- android-sdk +- android-sdk and ndk - ant, apache-maven, gradle, hhvm, julia, lein - swift, miniconda -- azure-cli, vim +- azure-cli, aws-cli, vim - buildah, ghc - cabal* - clang-9,clang-8, llvm-8 & lld-8 - Docker Image Caches -- dotnet, powershell +- dotnet, graalvm, powershell - erlang, php*, ruby, rake, rust & swig - gcc-7, g++-7, cpp-7 - gcc-8, g++-8, cpp-8 @@ -64,7 +64,7 @@ The main programs removed by this action are - - mono* - mercurial, subversion - node_modules -- phantomjs, chrome_driver, gecko_driver +- phantomjs, chrome_driver, gecko_driver, xvfb - python2 & pip local packages - podman ``` diff --git a/cleanup.sh b/cleanup.sh index 423c9af..32b04c5 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -156,13 +156,16 @@ sudo -E apt-get -qq -y autoremove &>/dev/null printf "Removing Homebrew...\n" curl -sL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh -o uninstall-brew.sh && chmod a+x uninstall-brew.sh ./uninstall-brew.sh -f -q &>/dev/null +rm -f ./uninstall-brew.sh &>/dev/null +printf "Removing NodeJS, NPM & NPX, PIPX & PIP packages...\n" sudo npm list -g --depth=0. 2>/dev/null | awk -F ' ' '{print $2}' | awk -F '@[0-9]' '{print $1}' | sudo xargs npm remove -g &>/dev/null sudo rm -rf -- /usr/local/lib/node_modules /usr/local/n &>/dev/null pipx uninstall-all &>/dev/null pip freeze --local | xargs sudo pip uninstall -y &>/dev/null find /usr/share /usr/lib /snap ~/.local/lib -depth -type d -name __pycache__ -exec rm -rf '{}' + 2>/dev/null; &>/dev/null +printf "Removing Lots of Cached Programs & Unneeded Folders...\n" sudo rm -rf -- \ /usr/local/bin/aws /usr/local/bin/aws_completer /usr/local/aws-cli \ /usr/share/az_* \ @@ -171,7 +174,7 @@ sudo rm -rf -- \ /usr/local/graalvm \ /etc/mysql \ /etc/php \ - /etc/apt/sources.list.d \ + /etc/apt/sources.list.d/* \ /opt/hostedtoolcache/* \ /usr/local/julia* \ /usr/local/lib/android \ @@ -186,7 +189,7 @@ sudo rm -rf -- \ /usr/share/man \ &>/dev/null -printf "Clearing Dangling Remains...\n" +printf "Clearing Dangling Remains of Applications...\n" sudo -E apt-get -qq -y clean &>/dev/null sudo -E apt-get -qq -y autoremove &>/dev/null sudo rm -rf -- /var/lib/apt/lists/* /var/cache/apt/archives/* &>/dev/null