@@ -27,7 +27,7 @@ delete_path() {
2727# ---------------------------------------
2828# 1. Remove known unnecessary dirs/files
2929# ---------------------------------------
30- printf " ${CYAN} [1/5 ] Removing unused files and directories...${RESET} \n"
30+ printf " ${CYAN} [1/6 ] Removing unused files and directories...${RESET} \n"
3131
3232delete_path " ${HOME} /.android" # Android SDK leftovers
3333delete_path " ${HOME} /.cargo" # Rust cache
5555# ------------------------
5656# 2. Clear cliphist cache
5757# ------------------------
58- printf " ${CYAN} [2/5 ] Clearing cliphist cache...${RESET} \n"
58+ printf " ${CYAN} [2/6 ] Clearing cliphist cache...${RESET} \n"
5959if command -v cliphist & > /dev/null; then
6060 cliphist wipe && printf " ${GREEN} cliphist cache wiped${RESET} \n"
6161else
6565# -------------------------------
6666# 3. Vacuum systemd journal logs
6767# -------------------------------
68- printf " ${CYAN} [3/5 ] Vacuuming journal logs older than 7 days...${RESET} \n"
68+ printf " ${CYAN} [3/6 ] Vacuuming journal logs older than 7 days...${RESET} \n"
6969sudo journalctl --vacuum-time=7d &&
7070 printf " ${GREEN} Journal logs vacuumed${RESET} \n"
7171
7272# --------------------------
7373# 4. Clean stale /tmp files
7474# --------------------------
75- printf " ${CYAN} [4/5 ] Cleaning stale /tmp files (older than 3 days)...${RESET} \n"
75+ printf " ${CYAN} [4/6 ] Cleaning stale /tmp files (older than 3 days)...${RESET} \n"
7676sudo find /tmp -mindepth 1 -mtime +3 -print0 | while IFS= read -r -d ' ' file; do
7777 sudo rm -rf " $file " && printf " ${GREEN} Deleted stale tmp:${RESET} %s\n" " $file "
7878done
7979
80+ # ---------------
81+ # 5. Empty trash
82+ # ---------------
83+ printf " ${CYAN} [5/6] Cleaning stale /tmp files (older than 3 days)...${RESET} \n"
84+ gio trash --empty
85+
8086# ----------------------------------
81- # 5 . Run rmlint on selected folders
87+ # 6 . Run rmlint on selected folders
8288# ----------------------------------
83- printf " ${CYAN} [5/5 ] Running rmlint on select folders...${RESET} \n"
89+ printf " ${CYAN} [6/6 ] Running rmlint on select folders...${RESET} \n"
8490RMLINT_TARGETS=(
8591 " ${HOME} /Documents"
8692 " ${HOME} /Videos"
0 commit comments