Last active
January 25, 2024 20:52
-
-
Save seujorgenochurras/1d20bbf088b814bdda6e1f513b3299a8 to your computer and use it in GitHub Desktop.
Kills useless services that might be using your useful RAM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
#WARNING THIS MIGHT BREAK SOMETHING OR CORRUPT FILES | |
#I HAVEN'T DONE RESEARCH ON ANY OF THOSE APPS, SO I'M NOT EVEN SURE WHAT THEY DO | |
bloatwareNames="package|io.elementary|mysqld|djs|nautilus|evolution|tracker|execsn|ibus|hidpi|\(sd-|cups|flatpak-por|dotnet" | |
bloatwareIds=$(ps -TA | grep -Po "[0-9]{3,} (?=(\?|p).*(?=($bloatwareNames)))" | tr -d '\n') | |
sudo kill $(echo $bloatwareIds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment