> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Why are files left after uninstalling?

> Understand which files the uninstaller keeps on purpose, how to let users delete their data, and what to do when removal fails.

After removing your app, you might find files or folders still there. Usually that's on purpose. This page explains when, and what you can change.

## Files left in the install folder

**Why:** the uninstaller only deletes files it installed. Files your app created, such as logs, caches or settings saved next to the program, stay. So does a file that was changed after install.

**Fix:**

* Save data in `%APPDATA%` or `%LOCALAPPDATA%`, not next to your program, and list those folders in `[uninstall] data`.
* If your app creates files that should always go, remove them with a [`[[run]]` step](/docs/guides/run-programs) with `when = "uninstall"`.

## Files left in AppData

**Why:** user data is kept unless you list it and the user ticks **Also delete my data**.

**Fix:**

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[uninstall]
data = ['%APPDATA%\Hello Notes']
```

This applies to versions installed after you add it, since the uninstaller carries the settings of the version that was installed.

## The box didn't delete a folder

The last page says which folder couldn't be deleted, usually because a program or antivirus held a file. Delete it by hand.

## Removal failed

If a file can't be removed, nothing is: the app stays installed and working, and the message names the file. Close the program holding it (often your app in the background, or an antivirus scan) and try again.

## A Start menu folder remains

A `start_menu_folder` is removed only when empty, since another of your apps may use it.

## The app is gone but still listed

Run the uninstaller again from **Settings › Apps**. If its files were deleted by hand, install the app again with the setup file, then uninstall it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.