notes

Log | Files | Refs

disk.txt (1393B)


      1 List the top 10 largest folder by disk usage:
      2 
      3 du -h --max-depth=1 | sort -hr | head -11
      4 
      5 
      6 List least used apps with disk :usage:
      7 
      8 #!/bin/bash
      9 
     10 printf '%-12s %8s  %s\n' "LAST_USED" "SIZE" "DIR"
     11 for d in ~/.config/*/ ~/.config/.[!.]*/; do
     12     [ -e "$d" ] || continue
     13     sz=$(du -sh "$d" 2>/dev/null | cut -f1)
     14     ts=$(find "$d" -type f -printf '%T@\n' 2>/dev/null | sort -n | tail -1)
     15     when=$(date -d "@${ts%.*}" '+%Y-%m-%d' 2>/dev/null)
     16     printf '%-12s %8s  %s\n' "$when" "$sz" "$(basename "$d")"
     17 done | sort | head -40
     18 
     19 ====================================================================
     20 
     21 Suggested order of attack
     22 
     23  Run these one by one and recheck with df -h:
     24 
     25  ```bash
     26    # 1. Empty trash
     27    rm -rf ~/.local/share/Trash/*
     28 
     29    # 2. Pacman cache
     30    sudo paccache -rk3
     31 
     32    # 3. yay cache
     33    rm -rf ~/.cache/yay/*
     34 
     35    # 4. Journal
     36    sudo journalctl --vacuum-size=500M
     37 
     38    # 5. Docker
     39    docker system prune -a --volumes
     40 
     41    # 6. Rust debug builds only (safer than full cargo clean)
     42    find /home/quintessa/code -type d -path "*/target/debug" -prune -exec rm
     43  -rf {} +
     44 
     45    # 7. Huggingface cache
     46    rm -rf ~/.cache/huggingface/*
     47  ```
     48 
     49  That sequence alone should free well over 1.5 TB, probably closer to 2 TB,
     50  without touching any of your actual source code, games, or personal files.
     51 
     52  After that, decide on Ollama models, Steam games, and old videos if you
     53  still need more space.