dotfiles/scripts/emergency-clean
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

20 lines
435 B
Plaintext
Executable file

#!/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