Sync workspace with Gitea: merge June/July session docs

- README + siklos-docker-services: add authentik/searxng/beszel rows, photos VM section,
  2026-06-24 cleanup notes, 2026-07-03 Portainer conversion note (jgpc naming preserved)
- Add: authentik setup docs, frigate docs/config, OCIS migration docs, AdventureLog bug
  report, install-native-apps.sh, workstation-disk-analysis.md
- Remove obsolete: cgitta-nextcloud-zip-analysis.md, kopia-restore-guide.md
- .gitignore: ocis-credentials.md (secrets stay local), *.bak
This commit is contained in:
2026-07-08 14:12:05 -05:00
parent bab19cd790
commit 7cb2ebed2d
27 changed files with 1611 additions and 595 deletions
+232
View File
@@ -0,0 +1,232 @@
# Workstation OS Drive — Disk Analysis & Cleanup Plan
**Date:** 2026-05-27
**OS Drive:** `/dev/sda2` — 234 GB total | **190 GB used (86%)** | only 32 GB free ⚠️
**Target drive:** `/mnt/14TB-HD` (`/dev/sdb2`) — 12.7 TB total | 2.7 TB used | **9.4 TB free**
---
## Drive Layout Summary
| Mount Point | Drive | Size | Used | Free | % |
|---|---|---|---|---|---|
| `/` (OS) | /dev/sda2 | 234 GB | 190 GB | 32 GB | **86% ⚠️** |
| `/mnt/14TB-HD` | /dev/sdb2 | 12.7 TB | 2.7 TB | 9.4 TB | 23% ✅ |
| `/mnt/INTEL-SSD` | /dev/nvme0n1p1 | 469 GB | 449 MB | 445 GB | <1% ✅ |
| `/mnt/StorFly-SSD` | /dev/sdc1 | 1.8 TB | 1.4 TB | 312 GB | 82% |
| `/mnt/photos` (NFS) | TrueNAS NFS | 11 TB | 6.4 TB | 3.9 TB | 63% |
---
## What's Eating Your OS Drive
### Top-Level Breakdown
| Category | Location | Size |
|---|---|---|
| Home directory total | `/home/jgitta` | **65 GB** |
| System packages & libs | `/var`, `/usr` | **~12 GB** |
| Installed apps | `/opt` | **5.2 GB** |
### The Biggest Offenders (inside /home)
| Item | Path | Size | Notes |
|---|---|---|---|
| Google Chrome AI model | `~/.config/google-chrome/OptGuideOnDeviceModel` | **4.0 GB** | Regenerates automatically — safe to delete |
| Flatpak app data | `~/.var/app/` | **7.0 GB** | Brave (3.7G), Dolphin (1.4G), DigiKam (0.9G), Zen (0.7G) |
| DigiKam face database | `~/.local/share/digikam` | **5.5 GB** | Move to 14TB (photo metadata) |
| Gemini scratch space | `~/.gemini/antigravity/scratch` | **3.5 GB** | Temp AI workspace — can be purged or redirected |
| .cache (total) | `~/.cache/` | **7.1 GB** | Browser caches, thumbnails, package caches |
| .config (total) | `~/.config/` | **13 GB** | Chrome (5.1G incl. 4G AI model), Claude (2.4G), Brave (2.1G) |
| Downloads folder | `~/Downloads` | **6.9 GB** | Mostly old installers |
| debian-iso folder | `~/debian-iso` | **5.0 GB** | ISOs — move or delete |
| VS Code extensions | `~/.vscode` | **1.9 GB** | Can move to 14TB |
| Firefox profile | `~/.mozilla` | **1.5 GB** | Mostly cache |
| .rustup | `~/.rustup` | **1.4 GB** | Rust toolchain |
| .npm | `~/.npm` | **1.4 GB** | npm cache |
### Big items in /var and /opt
| Item | Path | Size | Notes |
|---|---|---|---|
| Flatpak system install | `/var/lib/flatpak` | **6.7 GB** | Runtimes, apps |
| System journal logs | `/var/log/journal` | **2.9 GB** | Can be capped to 500 MB |
| APT package cache | `/var/cache/apt` | **610 MB** | Safe to clear |
| Beekeeper Studio | `/opt/Beekeeper Studio` | **1.2 GB** | App install |
| Frigate config | `/opt/frigate/config` | **913 MB** | Move to 14TB |
| Netdata | `/opt/netdata` | **693 MB** | Move data dir to 14TB |
---
## PART 1 — Immediate Cleanup (Safe to Delete)
**Estimated savings: ~1822 GB — no data loss**
### Step 1: Empty the Trash (1.3 GB)
```bash
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.local/share/Trash/info/*
```
### Step 2: Delete Chrome's AI Optimization Model (4 GB!)
Chrome downloads a machine-learning model to optimize page loading. It **rebuilds itself automatically** the next time Chrome runs — you lose nothing permanent.
```bash
rm -rf ~/.config/google-chrome/OptGuideOnDeviceModel
```
### Step 3: Clear All Browser Caches (~5.5 GB)
Browsers rebuild their cache as you browse. You may notice slightly slower page loads for a day or two.
```bash
rm -rf ~/.cache/BraveSoftware/Brave-Browser/Default/Cache
rm -rf ~/.cache/google-chrome/Default/Cache
rm -rf ~/.cache/google-chrome/"Profile 1"/Cache
rm -rf ~/.cache/google-chrome/"Profile 2"/Cache
rm -rf ~/.cache/mozilla/firefox/*.default-release/cache2
rm -rf ~/.cache/browser-os/*/Cache
```
### Step 4: Clear Package Manager Caches (~1.8 GB)
```bash
sudo apt clean # APT downloaded .deb files (610 MB)
rm -rf ~/.cache/uv # Python uv cache (638 MB)
rm -rf ~/.cache/node-gyp # Node build cache (120 MB)
npm cache clean --force # npm cache (part of ~/.npm)
rm -rf ~/.cache/go-build # Go build cache (77 MB)
```
### Step 5: Trim System Journal Logs (saves ~2.4 GB)
Linux keeps a rolling log of everything happening on the system. 2.9 GB is excessive — capping it at 500 MB still keeps plenty of history for troubleshooting.
```bash
sudo journalctl --vacuum-size=500M
```
### Step 6: Clear Thumbnail Cache (~404 MB)
These are small preview images for your file manager. They regenerate automatically when you browse folders.
```bash
rm -rf ~/.cache/thumbnails/*
```
### Step 7: Remove Unused Flatpak Runtimes (~13 GB)
Flatpak keeps old runtime versions even after apps are updated. This command removes anything nothing depends on anymore.
```bash
flatpak uninstall --unused
```
### Step 8: Clear Playwright Test Browser Cache (~128 MB)
```bash
rm -rf ~/.cache/ms-playwright-go
```
### Step 9: Clear Gemini Temp Files (~64 MB)
```bash
rm -rf ~/.gemini/tmp/*
```
---
## PART 2 — Move Data to the 14TB Drive
**Estimated freed from OS drive: ~20 GB**
The strategy here is: move the folder to the 14TB drive, then create a **symlink** at the original location. Think of a symlink like a Windows shortcut — when a program goes looking for `~/Downloads`, Linux silently redirects it to the real folder on the 14TB drive. The program never knows anything changed.
> **Before running any move command**, make sure the 14TB is mounted:
> `ls /mnt/14TB-HD` — you should see files listed, not an empty folder.
### Move 1: Downloads Folder (6.9 GB)
```bash
mv ~/Downloads /mnt/14TB-HD/Downloads
ln -s /mnt/14TB-HD/Downloads ~/Downloads
```
### Move 2: Debian ISOs (5.0 GB)
These are just old installation images — move them to the 14TB for archiving, or delete if you no longer need them.
```bash
mv ~/debian-iso /mnt/14TB-HD/debian-iso
```
### Move 3: FreeDOS Custom Build (423 MB)
```bash
mv ~/freedos-custom /mnt/14TB-HD/freedos-custom
```
### Move 4: DigiKam Photo Database (5.5 GB)
DigiKam (your photo manager) stores its face recognition engine and metadata database in your home folder. Moving it to the 14TB frees up 5.5 GB.
```bash
mv ~/.local/share/digikam /mnt/14TB-HD/digikam-db
ln -s /mnt/14TB-HD/digikam-db ~/.local/share/digikam
```
After moving, open DigiKam and go to **Settings → Configure DigiKam → Database** to confirm it still sees the database correctly.
### Move 5: Frigate Config & Data (913 MB)
If Frigate is running, stop it first so files aren't in use:
```bash
sudo systemctl stop frigate # stop the service first
sudo mv /opt/frigate /mnt/14TB-HD/frigate
sudo ln -s /mnt/14TB-HD/frigate /opt/frigate
sudo systemctl start frigate
```
### Move 6: VS Code Extensions (1.9 GB — optional)
```bash
mv ~/.vscode /mnt/14TB-HD/vscode
ln -s /mnt/14TB-HD/vscode ~/.vscode
```
---
## PART 3 — Change Default Save Locations in Programs
### All Browsers — Change Download Folder
Set each browser's download location to `/mnt/14TB-HD/Downloads` so new downloads go there automatically:
- **Brave:** Settings → Downloads → Location
- **Chrome:** Settings → Downloads → Location
- **Firefox:** Settings → General → Downloads → Save files to
### System-Wide Default Download Location
This tells all XDG-aware Linux apps (file manager, etc.) where the Downloads folder is:
```bash
nano ~/.config/user-dirs.dirs
# Find this line:
# XDG_DOWNLOAD_DIR="$HOME/Downloads"
# Change it to:
# XDG_DOWNLOAD_DIR="/mnt/14TB-HD/Downloads"
# Save with Ctrl+O, then Ctrl+X to exit
```
---
## Summary: Expected Space Recovered
| Action | Estimated Savings |
|---|---|
| Empty Trash | 1.3 GB |
| Chrome AI model (OptGuide) | 4.0 GB |
| Browser caches (all) | 5.5 GB |
| Package manager caches | 1.8 GB |
| Journal logs (trim to 500 MB) | 2.4 GB |
| Thumbnail cache | 404 MB |
| Flatpak unused runtimes | ~13 GB |
| Gemini temp + Playwright cache | ~192 MB |
| **Total cleanup (no data loss)** | **~1822 GB** |
| Move Downloads to 14TB | 6.9 GB |
| Move debian-iso + freedos to 14TB | 5.4 GB |
| Move DigiKam DB to 14TB | 5.5 GB |
| Move Frigate to 14TB | 0.9 GB |
| Move VS Code extensions to 14TB | 1.9 GB |
| **Total moved to 14TB** | **~20 GB** |
| **GRAND TOTAL FREED FROM OS DRIVE** | **~3842 GB** |
After all steps, the OS drive should drop from **86% → roughly 5560% full**,
giving you ~5565 GB of breathing room.
---
## Bonus Tips
- **Your 469 GB Intel SSD at `/mnt/INTEL-SSD` is nearly empty** (only 449 MB used of 469 GB).
Consider using it for speed-sensitive data like VS Code, DigiKam DB, or your home `~/.config` folder — SSDs are much faster than the spinning 14TB hard drive.
- **Brave Browser appears twice:** you have it installed both as a native app (`/opt/brave.com`, 429 MB) and as a Flatpak (`~/.var/app/com.brave.Browser`, 3.7 GB). You are likely only using one. Running `flatpak uninstall com.brave.Browser` would free ~3.7 GB if you use the native version.
- **Make sure `/mnt/14TB-HD` auto-mounts at boot** so symlinks don't break. Check with:
```bash
grep 14TB /etc/fstab
```
If there's no entry, the drive may only mount when you log in — ask Claude to help add a permanent fstab entry.