Skip to content

Instantly share code, notes, and snippets.

@MightyPork
Created February 25, 2017 21:41
Show Gist options
  • Select an option

  • Save MightyPork/aa9e30ce0b1c39d277c1678e6ed48f83 to your computer and use it in GitHub Desktop.

Select an option

Save MightyPork/aa9e30ce0b1c39d277c1678e6ed48f83 to your computer and use it in GitHub Desktop.
#!/bin/bash
[[ $EUID != 0 ]] && echo -e "\e[0;91mMust be root.\e[0m" && exit 1
echo -e "\e[1;36mCleaning package caches\e[0m"
# All packages
paccache -r -k 3 -c /var/cache/pacman/pkg
paccache -r -k 2 -c /var/cache/makepkg
# Uninstalled packages
paccache -r -u -k 1 -c /var/cache/pacman/pkg -c /var/cache/makepkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment