Undo, history and release
dkit clean, dkit purge, dkit installers and dkit uninstall do not delete things where they stand. Every item is first moved into Deskit’s own holding folder. From there it is either freed at once or held for a while, and what is held can be put back.
dkit undo # put back what the last run is holding
dkit history # what was cleaned, and what can still be undone
dkit release # delete what is being held, freeing the space now
What is held
It depends on what losing the item would cost you:
| Cost | What happens | Undo |
|---|---|---|
| rebuilds itself | Freed at once. The app recreates the files. | No |
| re-downloads when needed, slow to rebuild, cannot be undone | Held for 7 days, then freed | Yes, for 7 days |
The preview and the confirmation both show how much falls on each side before anything happens. You can change it for one run:
| To | In the confirmation | With --yes |
|---|---|---|
| Hold everything, so all of it can be undone | h |
--hold |
| Free everything at once, with no undo | f |
--release |
Held items still take up space. A run that holds 20 GB frees that 20 GB only when the 7 days are over, or when you release it.
Undo
dkit undo # everything the latest run is holding
dkit undo 20261128-153045 # everything a specific run is holding
dkit undo 20261128-153045 ~/code/shop # only what was in this folder
dkit undo 20261128-153045 ~/code/shop/node_modules # only this item
- The run id comes from
dkit history. - A path can be an item itself or a folder above it. Naming a project folder puts back every build folder that was taken from it.
- Putting back part of a run leaves the rest held. It can be put back or released later.
- If a path you name is not something that run is holding, nothing is put back and the error says so.
- Items go back to exactly where they were.
Undo cannot put back:
- anything that was freed at once, or released since
- an item whose place has been taken. If an app has already created new files there, undo leaves the new files alone and keeps yours held, where you can still release them. An empty folder in the way is replaced.
History
dkit history # every run, newest first
dkit history 20261128-153045 # one run, item by item
The list shows each run’s size, age and state:
| State | Meaning |
|---|---|
| held · undo for 5 days | Everything in the run can still be put back |
| 2.9 GB held for 5 days | Part of the run was freed or put back; this much is still held |
| undone | Everything that was held has been put back |
| released | Nothing is held any more; the space is free |
One run shows every item and what became of it: held, put back, freed, or not moved with the reason it was left where it was.
Release
dkit release # everything being held, from every run
dkit release 20261128-153045 # one run
Releasing deletes held items for good. It asks first, and outside a terminal it needs --yes.
You rarely need it: runs older than 7 days are released automatically the next time you run dkit clean or dkit purge. Use it when you want the space back sooner.
Where things are held
Inside Deskit’s data folder, in runs/<run id>/:
| System | Location |
|---|---|
| macOS | ~/Library/Application Support/Deskit |
| Linux | ~/.local/share/deskit (or $XDG_DATA_HOME/deskit) |
| Windows | %LOCALAPPDATA%\Deskit |
Do not move or edit what is in there by hand; dkit undo relies on it.
The same folder holds your keep list (keep.txt), your saved purge folders (purge-folders.txt) and, after a full-screen view run with --debug, debug.log. Deskit keeps nothing anywhere else. dkit remove deletes all of it.
Known limits
- An item on a different disk than your home folder cannot be moved aside yet. It is reported and left where it was.
dkit historydoes not yet say whether a run was a clean or a purge.- There is no list to pick from in the terminal: you name the paths.
dkit history <run>shows them.
From docs/commands/undo.md at v0.1.0-alpha.2.