Share via

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
Answer accepted by question author
  1. Ramesh 176.1K 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".

    50+ people found this answer helpful.
    0 comments No comments

10 additional answers

Sort by: Most helpful
  1. _AW_ 67,206 Reputation points Volunteer Moderator
    2023-12-24T06:03:25+00:00

    The Notepad cache can be found as follows:

    • Open File Explorer and copy/paste the following into the address bar > press enter: %localappdata%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState
    10+ people found this answer helpful.
    0 comments No comments
  2. Jonathan Deives 70,510 Reputation points Independent Advisor
    2023-12-24T04:55:14+00:00

    My name is Jonathan Deives. I'm an Independent Advisor and I'll be glad to help you today.

    Notepad itself does not have a cache, it is probably related to the recent files list by Windows, follow these steps and see if the problem persists.

    Open Notepad.

    Right-click on the Notepad icon in the taskbar.

    Right-click on the file you want to remove from the list.

    Select "Remove from list".

    If the file is still appearing, try clearing recent files from File Explorer;

    *Open File Explorer.

    *In the left sidebar, right-click on "Quick access."

    *Select "Options."

    *Under the "General" tab, find the "Privacy" section.

    *Click the "Clear" button next to "Clear File Explorer history."

    3 people found this answer helpful.
    0 comments No comments
  3. Ramesh 176.1K Reputation points Volunteer Moderator
    2023-12-24T07:25:36+00:00

    Glad that info helped. To prevent the files from being recovered by a third-party data recovery tool, use SDelete with the -c switch.

    -c Clean free space.

    These links can help.

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-12-24T05:55:31+00:00

    Notepad was opening directly to the file, even though the USB drive containing the file was not plugged in anymore. Now that I've removed the file name from Notepad's file list (per your instructions), it won't directly open the file anymore, but the fact remains that the file contents are still somewhere on the hard drive. Hence my desire to find where it's cached so I can shred it.

    Thanks for any help

    1 person found this answer helpful.
    0 comments No comments