Inkscape Document Editing and Auto-Save Recovery: Is the Tilde Autosave File Removed After Successful Recovery?
0 reputation · 11 Sept 2020, 03:48 UTC
0 reputation · 11 Sept 2020, 03:48 UTC
Inkscape's document editing workflow relies on an auto-save mechanism that writes periodic copies of the active SVG to a tilde-suffixed file (or .svg.bak on some platforms) in the same directory. When the application terminates unexpectedly, the next launch detects this autosave artifact and offers it as a recovered version containing edits made since the last manual save.
The unresolved behavior concerns the lifecycle of that autosave file after recovery. It is not documented whether Inkscape deletes the tilde or .svg.bak file once the user accepts the recovered document, and the behavior varies between versions. This creates uncertainty around disk-space consumption and the accumulation of stale recovery copies alongside the original document.
Because the recovery dialog presents the autosave as the authoritative restored state, users need to know whether the underlying backup file is treated as transient or persistent. If it persists, does Inkscape overwrite it on subsequent autosave cycles, or do multiple stale copies accumulate? If it is removed, is that removal tied directly to accepting the recovery dialog, and what happens if the user declines the recovered version?
34275 reputation · 11 Sept 2020, 10:47 UTC
No. Accepting Inkscape's recovery dialog does not reliably delete the tilde-suffixed autosave or .svg.bak artifact. In practice the file commonly remains on disk after the recovered document opens. Treat it as persistent until you have verified the behavior on your exact version and OS.
document.svg~ or document.svg.bak depending on build and platform.Inkscape uses a single fixed autosave filename per document. Later autosave cycles overwrite that one file rather than creating many unique recovery copies. The recovery dialog is about loading the content, not about cleaning up the file. Because of that design, the artifact is normally left in place after recovery, and may be overwritten on subsequent edits.
Behavior is version-sensitive. Some builds may move or remove the file, and the save-backup option can also produce a tilde/.bak file on normal save-over-original. Declining recovery also does not guarantee deletion; the artifact may remain for later manual recovery unless the dialog explicitly offers discard or delete.
Do not delete the tilde/.bak file before the recovered document has been saved and verified; it may be the only copy of post-last-save edits.
Verification you can run locally:
ls -l document.svg* # before restart and after choosing recovery
Check Inkscape Preferences for autosave interval and any save-backup option.
One missing diagnostic detail that changes the recommendation: the exact Inkscape version and OS you are using. The autosave filename and cleanup behavior vary between releases and platforms, so confirmation on your specific build is needed before assuming the file will be overwritten or removed automatically.
Use comments to ask for clarification. Post a solution as an answer.
34,275 reputation · 11 Sept 2020, 07:01 UTC
The tilde / .bak autosave is not guaranteed to be removed immediately when you accept a recovery. In Inkscape 1.x the file is treated as a transient session artifact: opening the recovered document loads the SVG into memory, but the backup file itself is typically left in place and then overwritten by the next autosave cycle once a new session starts. If recovery is declined, the file remains as well.
Behavior differs between 1.x and older 0.92.x builds, and OS-level write permissions in the working directory can prevent deletion or overwrite, which is why stale copies can accumulate. Practical verification involves checking the directory after recovery and after a subsequent edit session to see whether the file is removed or overwritten.