<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Usman</title>
    <description>The latest articles on DEV Community by Muhammad Usman (@usmanmateen).</description>
    <link>https://dev.to/usmanmateen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3818422%2Fe59731d1-51a6-4451-94d8-1982c6a26fe5.jpg</url>
      <title>DEV Community: Muhammad Usman</title>
      <link>https://dev.to/usmanmateen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/usmanmateen"/>
    <language>en</language>
    <item>
      <title>My uninstaller refuses to delete anything it can't prove belongs to the app. Poke holes in my safety rules</title>
      <dc:creator>Muhammad Usman</dc:creator>
      <pubDate>Mon, 02 Nov 2026 09:11:10 +0000</pubDate>
      <link>https://dev.to/usmanmateen/my-uninstaller-refuses-to-delete-anything-it-cant-prove-belongs-to-the-app-poke-holes-in-my-5eoe</link>
      <guid>https://dev.to/usmanmateen/my-uninstaller-refuses-to-delete-anything-it-cant-prove-belongs-to-the-app-poke-holes-in-my-5eoe</guid>
      <description>&lt;p&gt;Uninstall an app on Windows and the uninstaller tells you it was "successfully removed". Then look in &lt;code&gt;AppData&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Most uninstallers remove the program folder and leave behind everything the app created while you used it: data and caches in &lt;code&gt;Roaming&lt;/code&gt; and &lt;code&gt;Local&lt;/code&gt;, update downloads, dot-folders in your profile, Start-menu shortcuts, registry keys and start-up entries. Electron apps and anything with a local cache can easily leave gigabytes. In the demo below, the app's uninstaller removed 226 MB and left &lt;strong&gt;1.7 GB&lt;/strong&gt; behind.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://github.com/usmanmateen/untrail" rel="noopener noreferrer"&gt;Untrail&lt;/a&gt;: you drag an app's icon into it, it runs the app's own uninstaller, then it finds what's left and removes what you approve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flqdp5z57pt73xcs7ez26.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flqdp5z57pt73xcs7ez26.gif" alt="Untrail removing a demo app and its leftovers" width="760" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finding leftovers turned out to be the easy part. Most of the work went into &lt;strong&gt;not deleting the wrong thing&lt;/strong&gt;. This post is about the decisions that made that possible, and I'd love your critique of them: my specific questions are at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  The naive approach is dangerous
&lt;/h2&gt;

&lt;p&gt;The obvious algorithm is: search the usual places for folders named after the app, then delete them. It's also how you delete someone's files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name collisions.&lt;/strong&gt; An app called "Paint Pro" and a folder called &lt;code&gt;Paint Pro&lt;/code&gt; from a different vendor's product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Common words.&lt;/strong&gt; An app named "Notes" or "Sync" matches half your disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Old folders.&lt;/strong&gt; A &lt;code&gt;ZephyrPaintPro&lt;/code&gt; folder from a version you uninstalled three years ago, which you may have kept on purpose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared publisher folders.&lt;/strong&gt; &lt;code&gt;Program Files\SomeVendor&lt;/code&gt; can hold several of that vendor's apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your own files.&lt;/strong&gt; &lt;code&gt;Documents\AppName&lt;/code&gt; is often where &lt;em&gt;you&lt;/em&gt; saved things.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Links.&lt;/strong&gt; A junction inside an app folder can point anywhere, including your photos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the first rule I wrote down was: &lt;strong&gt;when in doubt, leave it.&lt;/strong&gt; Missing a leftover is a mild annoyance. Deleting something that wasn't the app's is unforgivable.&lt;/p&gt;

&lt;h2&gt;
  
  
  A name match is only a hint
&lt;/h2&gt;

&lt;p&gt;In Untrail, matching the name only makes a folder a &lt;em&gt;candidate&lt;/em&gt;. To be marked &lt;strong&gt;Safe to remove&lt;/strong&gt; and ticked by default, it also needs positive evidence that it belongs to the app. The evidence it accepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It holds the app's own program files: an exe or DLL whose product or company name matches the app.&lt;/li&gt;
&lt;li&gt;Its text files (JSON, INI, XML, logs and so on) mention the app's install folder.&lt;/li&gt;
&lt;li&gt;The app's own registry settings point to it.&lt;/li&gt;
&lt;li&gt;It's the app's &lt;strong&gt;Electron data folder&lt;/strong&gt;: the app ships an &lt;code&gt;app.asar&lt;/code&gt;, and the folder holds &lt;code&gt;Local State&lt;/code&gt; or &lt;code&gt;Preferences&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It sits inside the publisher's own folder.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And some signals count &lt;em&gt;against&lt;/em&gt; it, even with a matching name:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It hasn't been touched since before the app was installed (with a two-day margin).&lt;/li&gt;
&lt;li&gt;Its name is a common word.&lt;/li&gt;
&lt;li&gt;It can't be read. &lt;strong&gt;A failed check is a doubt, never a pass.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anything without evidence is still listed, with the reason, but marked &lt;strong&gt;Review&lt;/strong&gt; and left unticked. Anything in &lt;code&gt;Documents&lt;/code&gt; or &lt;code&gt;Saved Games&lt;/code&gt; is marked &lt;strong&gt;Keep&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's the core of it. Note the &lt;code&gt;catch&lt;/code&gt;: if anything goes wrong while checking, the folder isn't selected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;/// A matching name is only a hint. To be "Safe to remove", a folder also needs positive evidence that it is&lt;/span&gt;
&lt;span class="c1"&gt;/// this app's, and must not look abandoned since before the install. Any failure to check is a doubt.&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nf"&gt;OwnershipDoubt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Ctx&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;inPublisherFolder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;evidence&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;evidence&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Util&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsReparse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"It's a link to another folder — check where it points"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InstalledAt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HasValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;DateTime&lt;/span&gt; &lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Directory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetLastWriteTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FileSystemInfo&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;DirectoryInfo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;EnumerateFileSystemInfos&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;Take&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;300&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LastWriteTime&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;last&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LastWriteTime&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InstalledAt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddDays&lt;/span&gt;&lt;span class="p"&gt;(-&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"Same name as the app, but untouched since before it was installed"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;evidence&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inPublisherFolder&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s"&gt;"inside the publisher's folder"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;Evidence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;evidence&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s"&gt;"Same name as the app, but nothing in it links it to the app"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;evidence&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"Couldn't check what's inside, so it isn't selected"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every item in the list says &lt;em&gt;why&lt;/em&gt; it was found, so you can make the call yourself:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fktyy0xzclbav84q2oz7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fktyy0xzclbav84q2oz7c.png" alt="The scan list: sizes, safety ratings and the reason each item was found" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read-only scans of real apps on my own machine were reassuring in both directions. Large, legitimate data folders (11.9 GB for one code editor, 24.8 GB for Docker) were still marked Safe because the evidence was there, while same-named folders without evidence dropped to Review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uninstallers lie about being done
&lt;/h2&gt;

&lt;p&gt;Untrail runs the app's own uninstaller first, because it knows things a scanner can't. But when has it &lt;em&gt;finished&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;My first version simply asked you to confirm when the uninstaller had finished. Automating that is harder than it looks, because waiting for the uninstaller's process to exit is wrong for a lot of apps. Many uninstallers (NSIS, Inno Setup, Squirrel) copy themselves to &lt;code&gt;Temp&lt;/code&gt;, start the copy and exit immediately, so the process you launched exits within a second with code 0 while the real uninstall hasn't started. MSI runs inside &lt;code&gt;msiexec&lt;/code&gt;. Steam hands the job to the already-running Steam client.&lt;/p&gt;

&lt;p&gt;So Untrail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;follows the uninstaller's &lt;strong&gt;whole process tree&lt;/strong&gt; using toolhelp snapshots, not just the process it started;&lt;/li&gt;
&lt;li&gt;treats the exit code as meaningful only when no child processes were involved (and accepts MSI's 3010 and 1641, "success, restart needed");&lt;/li&gt;
&lt;li&gt;judges the result by the &lt;strong&gt;app itself&lt;/strong&gt;: it's only &lt;strong&gt;Completed&lt;/strong&gt; when the app's Installed-apps entry &lt;em&gt;and&lt;/em&gt; its program are both gone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are four outcomes: Running, Completed, Partial (finished, but something is still installed) and NoChange (probably cancelled). Untrail only removes leftovers after Completed. If the uninstall was cancelled or failed, it deletes nothing, unless you explicitly choose &lt;em&gt;Clean up anyway&lt;/em&gt;, with a warning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time of check vs. time of use
&lt;/h2&gt;

&lt;p&gt;A scan can take a while, and you might review the list for longer. Anything can change between the scan and the delete. So every delete is checked again right before it happens:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A fixed allowlist.&lt;/strong&gt; Registry deletion is limited to the app's own &lt;code&gt;Software\...&lt;/code&gt; keys, its Installed-apps entry, its App Paths entry and its &lt;code&gt;Run&lt;/code&gt;/&lt;code&gt;RunOnce&lt;/code&gt; values. Files must pass a list of protected paths: never a drive root, &lt;code&gt;Windows&lt;/code&gt;, &lt;code&gt;Program Files&lt;/code&gt; itself, &lt;code&gt;AppData&lt;/code&gt; itself, &lt;code&gt;Documents&lt;/code&gt; and so on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The app's identity.&lt;/strong&gt; The item must still belong to the app being removed. Folders that hold &lt;em&gt;another installed app&lt;/em&gt; are refused outright, even when they share a publisher.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The same path as the scan.&lt;/strong&gt; At scan time, Untrail records each item's real path with &lt;code&gt;GetFinalPathNameByHandle&lt;/code&gt;. If the path now resolves somewhere else (a folder swapped for a junction, for example), the delete is refused.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Links are never followed. For junctions and symbolic links, only the link itself is removed, never its target. If a folder being deleted contains a link, the link is removed and the walk doesn't descend into it.&lt;/p&gt;

&lt;p&gt;Two more rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No backup, no delete.&lt;/strong&gt; Registry entries are exported to &lt;code&gt;Documents\Untrail Backups&lt;/code&gt; first. If the export fails, the entry stays.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Admin only when needed.&lt;/strong&gt; Most leftovers live in your user profile and need no admin rights. For &lt;code&gt;Program Files&lt;/code&gt;, &lt;code&gt;ProgramData&lt;/code&gt; or machine-wide registry keys, Untrail starts an elevated helper and hands it the job over a named pipe. The helper checks it's talking to the Untrail window that started it (via the pipe's client process ID) and applies all the checks above again itself. It doesn't trust the window it's working for.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Measuring honestly
&lt;/h2&gt;

&lt;p&gt;My first results screen showed the total from the scan, not what had actually happened. But some items can fail to delete, some go to the Recycle Bin (which still uses space), and some files are in use.&lt;/p&gt;

&lt;p&gt;Now the results are measured, per drive:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flfobh0jwks7ynr1dgfmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flfobh0jwks7ynr1dgfmr.png" alt="Results: removed by the uninstaller, deleted by Untrail, and the measured change in free space" width="766" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Uninstaller removed:&lt;/strong&gt; measured before and after the app's own uninstaller ran.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untrail deleted:&lt;/strong&gt; what Untrail permanently deleted afterwards, with nothing counted twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recycle Bin&lt;/strong&gt;, &lt;strong&gt;At restart&lt;/strong&gt; (files in use, which Windows removes on the next restart) and &lt;strong&gt;Not removed&lt;/strong&gt;, each listed separately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free space change:&lt;/strong&gt; the drive's free space before and after. It's the real number, though other programs can affect it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After cleaning, Untrail scans again. It only says &lt;em&gt;"No additional leftovers detected in scanned locations"&lt;/em&gt; when that scan finished and found nothing. It never claims nothing is left.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing a program that deletes things
&lt;/h2&gt;

&lt;p&gt;You can't unit-test your way to confidence here. The integration suite installs &lt;strong&gt;throwaway fake apps&lt;/strong&gt; and runs &lt;strong&gt;real deletes&lt;/strong&gt; against them, on a clean Windows machine in GitHub Actions on every push. The fake apps are designed to trick it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a decoy with a colliding name, an old same-named folder dated before the install, and a folder it isn't allowed to read;&lt;/li&gt;
&lt;li&gt;junctions and symbolic links, both inside a leftover and as the leftover itself;&lt;/li&gt;
&lt;li&gt;an NSIS-style uninstaller that hands off to a hidden copy of itself, one that gets cancelled, and one that only partly uninstalls;&lt;/li&gt;
&lt;li&gt;a registry backup that fails, and a file locked by a running process;&lt;/li&gt;
&lt;li&gt;a decoy app from the same publisher, sharing its folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the checks is accounting: what the uninstaller removed plus what Untrail deleted must equal everything that was found, &lt;strong&gt;to the byte&lt;/strong&gt;. In total it's 86 checks, including the admin-only scenarios that need an elevated runner. The suite also refuses to start if any of its fixture paths already exist, so it can never run against something real by accident.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built with nothing but Windows
&lt;/h2&gt;

&lt;p&gt;A small detail that people seem to like: Untrail is plain C# for .NET Framework 4.8, which ships with Windows 10 and 11, and it's compiled with the &lt;code&gt;csc.exe&lt;/code&gt; that's already in &lt;code&gt;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\&lt;/code&gt;. A PowerShell script builds the app and its installer; no SDK, no Visual Studio. The installer is per-user, so it needs no admin rights either.&lt;/p&gt;

&lt;p&gt;The trade-off is C# 5 syntax (no string interpolation, no &lt;code&gt;?.&lt;/code&gt;), which honestly didn't hurt much.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I'd love your feedback
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What other evidence would you accept&lt;/strong&gt; that a folder belongs to an app? Can you think of a case where the five signals above would give a false positive?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is "untouched since two days before the install"&lt;/strong&gt; a sensible cut-off for old folders, or would you pick something else?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which apps have uninstallers that behave strangely&lt;/strong&gt;: hand-offs, reboots, services left running? I'd like to add them to the test suite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Should it default to the Recycle Bin&lt;/strong&gt; (as it does now) or delete permanently?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answers in the comments are hugely appreciated, especially the ones that prove me wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it, and tell me what it misses
&lt;/h2&gt;

&lt;p&gt;Untrail is free and MIT licensed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/usmanmateen/untrail" rel="noopener noreferrer"&gt;https://github.com/usmanmateen/untrail&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It isn't code-signed yet, so Windows SmartScreen will warn the first time you run it. Each release includes SHA-256 checksums, and from the next release the builds also carry signed build provenance you can check with &lt;code&gt;gh attestation verify&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The most useful thing you can send me is a &lt;strong&gt;leftover report&lt;/strong&gt;: an app where Untrail missed something, or matched something that wasn't the app's. Run &lt;code&gt;Untrail.exe --scan "&amp;lt;shortcut&amp;gt;" --hide-user --out report.txt&lt;/code&gt; (it replaces your user folder with &lt;code&gt;%USERPROFILE%&lt;/code&gt;) and attach it to an issue. That's how the matcher gets better without ever getting braver than the evidence allows.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>csharp</category>
      <category>windows</category>
      <category>discuss</category>
    </item>
    <item>
      <title>I built a webhook capture &amp; replay tool because I kept losing Stripe events at 3am</title>
      <dc:creator>Muhammad Usman</dc:creator>
      <pubDate>Wed, 11 Mar 2026 11:48:40 +0000</pubDate>
      <link>https://dev.to/usmanmateen/i-built-a-webhook-capture-replay-tool-because-i-kept-losing-stripe-events-at-3am-3851</link>
      <guid>https://dev.to/usmanmateen/i-built-a-webhook-capture-replay-tool-because-i-kept-losing-stripe-events-at-3am-3851</guid>
      <description>&lt;p&gt;I'm a junior dev and this kept happening to me.&lt;/p&gt;

&lt;p&gt;Deploy a new version. App restarts for 3 minutes. During those 3 minutes Stripe fires webhooks, GitHub triggers events, Shopify sends orders.&lt;/p&gt;

&lt;p&gt;App misses all of them. No retries. Just gone.&lt;/p&gt;

&lt;p&gt;I searched for a simple tool to fix this. Nothing fit. So I built Paggio.&lt;/p&gt;

&lt;p&gt;It sits between your webhook senders and your app. Every webhook is captured and stored even if your app is down. It forwards to your destination URL in real time. If something fails you replay it with one click to prod, staging, or localhost.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs92ksstrdtcfxsem5chy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs92ksstrdtcfxsem5chy.png" alt=" " width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It auto-detects 15 sources from request headers — Stripe, GitHub, Shopify, Linear, Vercel, Twilio, SendGrid, Mailgun and more. No config needed.&lt;/p&gt;

&lt;p&gt;You also get Discord and Slack notifications the moment a webhook is delivered or fails.&lt;/p&gt;

&lt;p&gt;Built with Next.js 14, Supabase, and Tailwind. Deployed on Vercel.&lt;/p&gt;

&lt;p&gt;Full documentation is available at &lt;a href="https://docs.paggio.dev" rel="noopener noreferrer"&gt;https://docs.paggio.dev&lt;/a&gt; — covering quickstart, all 15 integrations, replay guide, and Discord/Slack notification setup.&lt;/p&gt;

&lt;p&gt;Free during beta → &lt;a href="https://paggio.dev" rel="noopener noreferrer"&gt;https://paggio.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback from other devs — what would make this more useful for your workflow?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>programming</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
