Remove
dkit remove --dry-run # see what would be deleted; changes nothing
dkit remove # see the same list, then confirm
Removes Deskit itself from your machine: the files it keeps, and the dkit program when the install script put it there.
It always shows the list first. In a terminal it then asks, and anything but y leaves everything as it is. Outside a terminal it refuses without --yes.
What it deletes
Everything is in Deskit’s data folder, plus the one program file:
| What | Where |
|---|---|
| Held files and history | runs/: every run’s record, and whatever it is still holding |
| Keep list | keep.txt |
| Saved purge folders | purge-folders.txt |
| Debug log | debug.log, if you ever ran a full-screen view with --debug |
| Finder’s folder file | .DS_Store, which macOS writes into a folder you opened. Only a plain file by that name |
| The data folder itself | only if it is empty afterwards |
The dkit program |
the file that is running, when it stands on its own |
A file left half-written by an interrupted save (keep.txt.tmp and the like) is deleted as well.
Held files are deleted for good
Deleting the holding folder ends undo for everything in it. When something is held, the list says how much and from how many runs before you confirm. Put back what you still want first:
dkit history # which runs are still holding something
dkit undo <run-id> # put one run back
A copy from Homebrew or cargo keeps its program
dkit remove deletes Deskit’s own files and leaves the program to whatever installed it, showing the command:
| Installed with | Command to remove the program |
|---|---|
| Homebrew | brew uninstall deskitdev/tap/deskit |
| cargo | cargo uninstall deskit |
Run dkit remove first: once the program is gone it cannot clear its files for you.
The program is also left in place, with the reason, when:
- it was started through a symbolic link (delete the link and the file yourself);
- it is a development build inside a cargo build folder;
- it is not named
dkit; - the system is Windows, where a program cannot delete itself while it runs.
What it never does
These limits are built into the program:
- Only what Deskit can name. It deletes the entries listed above, directly inside its own data folder, and nothing else. Anything else found in that folder is left where it is and reported, and the folder then stays too.
- Never through a symbolic link. If the data folder, or one of the entries in it, is a link, it is left alone and reported. What the link points to is not touched.
- Never your shell’s startup files. If you added a line for
dkitto~/.zshrcor similar, such as tab completion or aPATHentry, remove it yourself. - Never the folder the program was in.
~/.local/binis yours. - Never anything you cleaned. Files that were put back, and everything else on your machine, are as they were.
- Never administrator rights. If the program’s folder cannot be written to, the program stays and the report says so.
The program is deleted last, and only when all of Deskit’s files went. If something could not be deleted, dkit is still there to try again.
Options
| Option | What it does |
|---|---|
--dry-run |
Show what would be deleted. Changes nothing |
--yes, -y |
Delete without asking. Needed when not in a terminal |
--json |
Print the list, or the result, as JSON |
When there is nothing of Deskit’s to delete, the command says so and exits with code 0, with or without --yes.
Output
dkit remove --dry-run --json
{
"dry_run": true,
"data_dir": "/Users/sam/Library/Application Support/Deskit",
"items": [
{ "what": "runs", "path": "/Users/sam/Library/Application Support/Deskit/runs", "bytes": 6657199309, "is_dir": true },
{ "what": "keep_list", "path": "/Users/sam/Library/Application Support/Deskit/keep.txt", "bytes": 4096, "is_dir": false }
],
"total_bytes": 6660408701,
"run_count": 12,
"held_run_count": 2,
"held_bytes": 6657199309,
"held_count": 25,
"held_runs": [
{ "id": "20260315-101502", "bytes": 4294967296, "count": 12 },
{ "id": "20260314-090000", "bytes": 2362232013, "count": 13 }
],
"left_alone": [],
"program": {
"path": "/Users/sam/.local/bin/dkit",
"origin": "standalone",
"bytes": 3205296,
"delete": true,
"left_because": null,
"command": null
}
}
whatisruns,keep_list,purge_folders,debug_log,unfinishedorfinder_file.held_*is whatdkit undocould still put back. It is deleted withruns.held_runslists those runs, newest first, each with itsid,bytesandcount.left_alonelists what is in the data folder but will stay, each with areason.program.deletesays whether the program file goes too. When it isfalse,left_becausesays why andcommandholds the command that removes it, if there is one.
dkit remove --yes --json prints dry_run: false, removed (the same items), removed_bytes, data_dir_removed, program_removed, failed (what stayed, each with a reason) and program.
Known limits
- Tried on macOS only.
- On Windows the program file is never deleted; delete
dkit.exe, anddkit.exe.oldif an update left one, yourself. - A copy of
dkitin another place is not looked for. Only the one that is running is considered. - An assistant cannot do this for you: there is no MCP tool for it.
From docs/commands/remove.md at v0.1.0-alpha.2.