| Crates.io | ds-store-killer |
| lib.rs | ds-store-killer |
| version | 0.2.1 |
| created_at | 2025-12-25 15:45:46.160021+00 |
| updated_at | 2025-12-26 05:19:22.541699+00 |
| description | Fast CLI to kill .DS_Store files with watch mode and launchd integration |
| homepage | |
| repository | https://github.com/kawayww/ds-store-killer |
| max_upload_size | |
| id | 2004679 |
| size | 72,602 |
F**king .DS_Store ! ! ! ! ! ? Kill those pesky
.DS_Storefiles on macOS
macOS only — Linux/Windows folks, you don't have to deal with this crap.
-y to skip)-n)--force to overridedsk watch-e node_modules -e .git)jwalkcargo install ds-store-killer
Nix users:
nix run github:kawayww/ds-store-killer
# or add to flake
{
inputs.dsk.url = "github:kawayww/ds-store-killer";
}
nix-darwin (declarative service):
# flake.nix
{
inputs.dsk.url = "github:kawayww/ds-store-killer";
}
# darwin-configuration.nix
{ inputs, ... }: {
imports = [ inputs.dsk.darwinModules.default ];
services.dsk = {
enable = true;
paths = [ "~/Downloads" "~/Projects" ]; # directories to watch recursively (default: ~)
notify = true; # optional: macOS notifications
# force = true; # optional: delete git-tracked files (DANGER)
# exclude = [ ".git" ]; # optional: exclude patterns
};
}
Build from source:
git clone https://github.com/kawayww/ds-store-killer
cd ds-store-killer
cargo build --release
dsk kill # current dir, asks before deleting
dsk kill -y # just delete, don't ask
dsk kill -n # dry-run, scan only
dsk kill -r ~/Projects # recursive
dsk kill -r --force ~/repo # include git-tracked files
dsk kill -ry --stats . # recursive, no confirm, show timing
dsk kill -ry -e node_modules # exclude pattern
dsk watch ~/Desktop # watch and auto-delete
dsk watch . -e .git # watch with exclusions
Deleting git-tracked .DS_Store messes up your commit history. By default, dsk skips them.
| Mode | Behavior |
|---|---|
| Default | Skips git-tracked files |
--force |
Includes them (still asks for confirmation) |
dsk kill -r ~/my-repo # skips tracked files
dsk kill -r --force ~/my-repo # includes them, still confirms
dsk kill -ry --force ~/my-repo # includes them, no confirmation
Why would .DS_Store be tracked?
.gitignoregit add -f.gitignore was added after the factNote: Git safety requires
gitto be installed. If git is not found,dskwill warn and proceed without the safety check.
Non-recursive scans are cached in $TMPDIR/dsk-cache/. Auto-invalidates when directory changes.
Recursive mode doesn't cache — can't reliably detect subdirectory changes, so we rescan every time.
Watch directories and auto-delete .DS_Store files instantly.
Behavior:
-r flag needed)..DS_Store files (logs a warning).--force: Auto-deletes ALL .DS_Store files, including git-tracked ones.Note: Unlike
killmode where--forcejust allows deletion (with confirmation), inwatchmode--forcemeans aggressive auto-deletion of tracked.DS_Storefiles.
dsk watch # current dir
dsk watch ~/Desktop # specific dir
dsk watch . -e .git # with exclusions
dsk watch --notify # send macOS notification on delete
dsk watch --force # DANGER: auto-delete git-tracked .DS_Store files too
Runs in foreground, Ctrl+C to stop.
For background monitoring that survives reboots:
dsk service install # watch ~ by default
dsk service install ~/Desktop ~/Projects # multi-path
dsk service install --notify # enable notifications
dsk service install --force # (DANGER) delete git-tracked files
dsk service install -e Downloads # exclude patterns
dsk service start
dsk service status
dsk service stop
dsk service uninstall
Uses FSEvents (via notify crate) — watching deep directory trees is efficient and doesn't consume file descriptors per subdirectory (solving os error 24).
Logs: /tmp/dsk.out.log, /tmp/dsk.err.log
Usage: dsk <COMMAND>
Commands:
kill Kill .DS_Store files
watch Watch directory and auto-delete
service Manage launchd service
help Print help
dsk kill [OPTIONS] [PATH]
-r, --recursive Recursive deletion
-e, --exclude Exclude patterns
-y, --yes Skip confirmation
-n, --dry-run Scan only, don't delete
-q, --quiet Don't list each file
--force Allow deleting git-tracked .DS_Store files
--stats Show timing
dsk watch [PATH]
-e, --exclude Exclude patterns
--notify Send macOS notification on delete
--force (DANGER) Auto-delete git-tracked .DS_Store files
dsk service install [PATHS...] [OPTIONS]
-e, --exclude Exclude patterns (persisted in plist)
--notify Enable macOS notifications
--force (DANGER) Delete git-tracked .DS_Store files
dsk service <uninstall|start|stop|status>
MIT