2022-08-02 18:34:45 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
2023-05-12 14:23:52 +00:00
|
|
|
# Containers / virtual machines
|
2022-08-02 18:34:45 +00:00
|
|
|
podman system prune --force --volumes
|
|
|
|
docker system prune --force --volumes
|
2023-05-12 14:23:52 +00:00
|
|
|
vagrant box prune
|
2022-08-02 18:34:45 +00:00
|
|
|
|
|
|
|
# Channels
|
|
|
|
sudo nix-channel --update
|
|
|
|
nix-channel --update
|
|
|
|
|
|
|
|
# User packages
|
|
|
|
home-manager expire-generations '-7 days'
|
|
|
|
home-manager switch
|
|
|
|
|
|
|
|
# System packages
|
|
|
|
sudo nixos-rebuild boot
|
|
|
|
|
|
|
|
# Filesystem
|
|
|
|
btrfs filesystem df /
|
|
|
|
sudo btrfs balance start --enqueue -dusage=50 -musage=50 /
|
|
|
|
|
|
|
|
sudo poweroff
|