#16005·tauri

[feat] Provide the option for the silent uninstaller to delete the application data

Author: ThomasBraun1979Created Sep 11, 2026Updated Sep 28, 2026
Labelstype: feature requestplatform: Windowsscope: bundler

Describe the problem

If you use the uninstaller in silent mode (parameter /S), there is no option to enable the deletion of the application data.

Describe the solution you'd like

Add an option to tauri.conf.json that allows this behaviour to be controlled. I suggest adding an uninstaller CLI flag /DELETEAPPDATA.

Why a CLI flag instead of a config option:

  • Whether app data should be removed is usually decided by whoever runs the uninstaller (e.g. a package manager like Chocolatey, or an IT deployment script), not at build time.
  • It matches how the other uninstaller options (/P, /UPDATE) already work.
  • The change is small and self-contained in installer.nsi.

Proposed behaviour:

  • uninstall.exe /S /DELETEAPPDATA (or /P /DELETEAPPDATA) deletes the app data, just like checking "Delete the application data" in the UI.
  • In interactive mode, /DELETEAPPDATA pre-checks that checkbox. The user can still uncheck it.
  • It has no effect together with /UPDATE, which keeps the current behaviour of never deleting app data during updates.

Alternatives considered

The behaviour can already be achieved today with the NSIS installer hooks (bundle > windows > nsis > installerHooks), since NSIS_HOOK_PREUNINSTALL runs before the app data check:

!macro NSIS_HOOK_PREUNINSTALL
  ${GetOptions} $CMDLINE "/DELETEAPPDATA" $R0
  ${IfNot} ${Errors}
    StrCpy $DeleteAppDataCheckboxState 1
  ${EndIf}
!macroend

Caveat: This relies on the internal Tauri variable $DeleteAppDataCheckboxState and may break with any Tauri update

Additional context

No response