-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleaner
executable file
·27 lines (22 loc) · 1.1 KB
/
cleaner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
echo "clearing recently used"
if [ -f "$HOME/.local/share/psi/.local/share/recently-used.xbel" ]; then
mv "$HOME/.local/share/psi/.local/share/recently-used.xbel" "$HOME/.local/share/psi/.local/share/recently-used.xbel.bak"
fi
touch "$HOME/.local/share/psi/.local/share/recently-used.xbel"
echo "<?xml version="1.0" encoding="UTF-8"?>\n<xbel version="1.0"\nxmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"\nxmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"\n></xbel>\n
" > "$HOME/.local/share/psi/.local/share/recently-used.xbel"
chmod a+xwr "$HOME/.local/share/psi/.local/share/recently-used.xbel"
echo "clearing tmp"
rm -rf "/tmp/*"
echo "clearing thumbnails"
rm -rf "$HOME/.thumbnails/*"
echo "clearing trash"
rm -r "$HOME/.local/share/Trash/files"
zenity --question --window-icon="/Images/logo.png" --text "Do you really want to remove the orphan libraries? (Warning: Dangerous Command!"
if [ $? -eq 0 ]; then
if [ ! "$(which deborphan)" ]; then # Missing Dependency
apt-get -y install deborphan
fi
apt-get -y --purge remove `deborphan`
fi