dotfiles/system/.local/bin/clean
Severin Kaderli 336619723e
Update several config files
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
2019-10-11 12:54:52 +02:00

34 lines
No EOL
654 B
Bash
Executable file

#!/usr/bin/env bash
#
# SCRIPT NAME:
# clean
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# This script cleans the system.
#
# USAGE:
# ./clean
. utils
print_section "Remove unneeded dependencies"
mapfile -t UNNEEDED_DEPENDENCIES < <(yay -Qdtq)
yay -Rsnu "${UNNEEDED_DEPENDENCIES[@]}"
print_section "Clear makepkg files"
print_log "Deleting files in ${YELLOW}${XDG_DATA_HOME}/src/${RESET}"
rm -rf "${XDG_DATA_HOME}/src/"*
print_section "Clean yay cache"
yay -Sc
print_section "Clean composer cache"
composer clearcache
print_section "Clean npm cache"
npm cache clean --force
print_section "Clean docker"
docker system prune