diff --git a/tools/erase-toolkit-traces.sh b/tools/erase-toolkit-traces.sh index c8dc762..3bd6fc4 100755 --- a/tools/erase-toolkit-traces.sh +++ b/tools/erase-toolkit-traces.sh @@ -145,16 +145,16 @@ if [ "$CLEAN_HISTORY" = true ] && [ -f ~/.bash_history ]; then echo "" echo "→ Final cleanup: Removing bash history..." - # Remove last 50 lines from history file + # Remove last 10 lines from history file (covers toolkit download/usage) total_lines=$(wc -l < ~/.bash_history) - if [ "$total_lines" -gt 50 ]; then - lines_to_keep=$((total_lines - 50)) + if [ "$total_lines" -gt 10 ]; then + lines_to_keep=$((total_lines - 10)) head -n "$lines_to_keep" ~/.bash_history > ~/.bash_history.tmp mv ~/.bash_history.tmp ~/.bash_history - echo " ✓ Removed last 50 history entries" + echo " ✓ Removed last 10 history entries" else > ~/.bash_history - echo " ✓ Cleared entire history (had < 50 entries)" + echo " ✓ Cleared entire history (had < 10 entries)" fi # Clear in-memory history and write clean file