Skip to content

Instantly share code, notes, and snippets.

@jeffsharpe
Created October 8, 2014 04:05
Show Gist options
  • Save jeffsharpe/2125428f039e2b053169 to your computer and use it in GitHub Desktop.
Save jeffsharpe/2125428f039e2b053169 to your computer and use it in GitHub Desktop.
clean-arch.sh
#!/bin/bash
# tar -cjf pacman-database.tar.bz2 /var/lib/pacman/local
sudo pacman --noconfirm -Rscn $(pacman -Qtdq)
sudo pacman --noconfirm -Sc
sudo pacman-optimize
sudo sync
if [ -x "/usr/bin/updatedb" ]; then
sudo updatedb
fi
echo $0: Finished processing!
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment