How to delete Notepad cache in Windows 11 Pro?

Anonymous
2023-12-24T04:10:41+00:00

Hello,

I used Notepad (just regular Notepad, not Notepad++) to open a somewhat sensitive file on a USB drive, then closed Notepad and removed the USB drive. Now I notice that when I open Notepad again, it automatically opens up the same file even with the USB drive not plugged in, so it obviously cached the file somewhere. Where is this cache? I'd like to shred the file. I looked in Users/<username>AppData/Roaming/, but I see nothing there for Notepad. There is no option to get the file location from within Notepad itself, something like 'File--> properties'. Both 'File --> Open' and 'File--> Save as' just default to my documents folder, and the file in question is not there. I am using Windows 11 Pro.

I know that Notepad settings can be changed to not open content from the previous session, but my priority right now is shredding the file from my drive.

Thanks for any help.

Windows for home | Windows 11 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Ramesh Srinivasan 173.9K Reputation points Volunteer Moderator
    2023-12-24T06:02:21+00:00

    Resetting Notepad should purge the confidential file from the caches.

    Open Settings, Apps.

    Click Installed Apps.

    Search for Notepad.

    Click on the ellipsis icon adjacent to "Notepad", and click "Advanced options"

    Image.

    In the resulting screen, click "Reset".

    52 people found this answer helpful.
    0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-12-24T09:27:54+00:00

    Thanks Ramesh!! I had never even heard of sDelete. I'm running it now...

    0 comments No comments
  2. Jonathan Deives 61,055 Reputation points Independent Advisor
    2023-12-24T12:36:37+00:00

    The file was probably opening because it was saved in the Windows file explorer. As you cleaned it, it was deleted and should only be opened again if you open it via USB.

    0 comments No comments