#!/bin/sh RMLIST="$HOME/.cache/dwb $HOME/.cache/emacs $HOME/.cache/mutt $HOME/.cmus/autosave $HOME/.cmus/cache $HOME/.cmus/lib.pl $HOME/.cmus/playlist.pl $HOME/.cmus/queue.pl $HOME/.cmus/resume $HOME/.cmus/search-history $HOME/.config/gtk-2.0 $HOME/.config/gtk-3.0 $HOME/.config/newsbeuter/cache.db $HOME/.config/newsbeuter/history.cmdline $HOME/.config/newsbeuter/history.search $HOME/.config/ranger/bookmarks $HOME/.config/ranger/history $HOME/.config/ranger/tagged $HOME/.gtk-bookmarks $HOME/.local/share/newsbeuter $HOME/.local/share/webkit $HOME/.mutt-pwds.cpt $HOME/.session/* $HOME/.ssh $HOME/.zcompdump $HOME/.zdirs $HOME/.zshhistfile" echo "==> List of files to be cleaned." echo "$RMLIST" CHOICE="N" echo echo "==> Clean home? [y/N]" read CHOICE CHOICE="$(echo $CHOICE | tr [:lower:] [:upper:])" if [ "$CHOICE" != "Y" ]; then echo "Nothing done." exit fi ## Delete git repo if any. [ -d "$HOME"] && rm -rvf "$HOME/.git" ## Delete Dropbox folder if any. [ -d "$HOME" ] && rm -rvf "$HOME/Dropbox" && rm -rvf "$HOME/.dropbox" ## Clean trash if possible. if [ -z "$(command -v trash-empty)" ]; then echo echo "==> 'trash-empty' not installed, you have to clean trash manually." else echo echo "==> Emptying trash." trash-empty fi ## Clear data. echo while read -r i; do rm -rvf "$i" done < Cleaning done."