How do I clear the previously opened files list in Notepad++?

Notepad++

Notepad++ Problem Overview


I accidentally opened a very, very large file (well not accidentally, but I didn't think it would crash Notepad++). Now whenever I try to open Notepad++, the program crashes, so I can't just turn off the setting. I also don't have admin privileges.

Notepad++ Solutions


Solution 1 - Notepad++

Delete
C:\Users\<YourUsername>\AppData\Roaming\Notepad++\session.xml
or shorter
%AppData%\Notepad++\session.xml

Solution 2 - Notepad++

You might be able to run Notepad++ with the -nosession command line flag which is documented as "Launch Notepad++ without previous session" (An earlier version of the documentation had "Use this parameter to launch Notepad++ without loading the previous session (the files opened in Notepad++ at the last time).)."

The session.xml file, plus other configuration files, can be in various locations. See the "Configuration Files Location" section of this page for the locations. (Actually the file locations are discussed in several places on that page.)

See also this answer https://stackoverflow.com/questions/24447786/notepad-doesnt-save-document-on-exit/24448488#24448488 which is about controlling whether Notepad++ reloads all its previous tabs when it is restarted.

Solution 3 - Notepad++

Type the path in the windows file explorer as follows:

C:\Users\USER NAME HERE\AppData\Roaming\Notepad++\backup

Clear everything in this folder and that's it!

Solution 4 - Notepad++

Notepad++ v7.4.2 (32bit) | This solution requires no extra effort before or after launching Notepad++.

 Settings/Preferences/Backup
 Uncheck "Remember current session for next launch"
 It's at top under [Session snapshot and periodic backup]

Solution 5 - Notepad++

Simply delete

C:\Users\<YourUsername>\AppData\Roaming\Notepad++\session.xml

and

C:\Users\<YourUsername>\AppData\Roaming\Notepad++\config.xml

After that, the Notepad++ history of previously opened files will be empty.

Solution 6 - Notepad++

Access the below file:

%AppData%\Notepad++\config.xml

Delete unwanted search cache marked as <Find name = “ BAD SEARCH”>

Solution 7 - Notepad++

Take a backup of your file and delete the one which you tried open in Notepad++. Your Notepad++ should resume to its normal state. You can then copy the file to its original path from the backup you took.

For large files, use EmEditor

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionReed OeiView Question on Stackoverflow
Solution 1 - Notepad++AndyView Answer on Stackoverflow
Solution 2 - Notepad++AdrianHHHView Answer on Stackoverflow
Solution 3 - Notepad++chandra shekarView Answer on Stackoverflow
Solution 4 - Notepad++Wendell HolmesView Answer on Stackoverflow
Solution 5 - Notepad++VitaliiView Answer on Stackoverflow
Solution 6 - Notepad++Mahmood ShehabView Answer on Stackoverflow
Solution 7 - Notepad++Harshita SethiView Answer on Stackoverflow