dotfiles/scripts/emergency-clean

20 lines
435 B
Plaintext
Raw Normal View History

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash
# Clears everything it can to save space
rm -rf $HOME/.cache
if command -v pacman > /dev/null; then
sudo pacman -Scc
fi
if command -v apt-get > /dev/null; then
sudo apt-get clean
fi
if command -v nix-store > /dev/null; then
sudo journalctl --vacuum-size=100M
fi
if command -v journalctl > /dev/null; then
sudo journalctl --vacuum-size=100M
fi