Skip to content

Instantly share code, notes, and snippets.

@MightyPork
Created November 4, 2015 22:36
Show Gist options
  • Save MightyPork/8f67fc7b6d5d05561b54 to your computer and use it in GitHub Desktop.
Save MightyPork/8f67fc7b6d5d05561b54 to your computer and use it in GitHub Desktop.
Cleans pacman and yaourt package cache
#!/bin/bash
[[ `whoami` != "root" ]] && echo "Must be root." && exit 1
echo -e "\e[1;36mCleaning package caches\e[0m"
# All packages
paccache -r -k 3 -c /var/cache/pacman
paccache -r -k 2 -c /var/cache/makepkg
# Uninstalled packages
paccache -r -u -k 1 -c /var/cache/pacman
paccache -r -u -k 1 -c /var/cache/makepkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment