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

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.


Solution 1:

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

Solution 2:

You might be able to run Notepad++ with the -nosession command line flag which is documented as "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 "Where are the files?" section of this page for the locations. (Actually the file locations are discussed in several places on that page.)

See also this answer Notepad ++ doesn't save document on exit? which is about controlling whether Notepad++ reloads all its previous tabs when it is restarted.

Solution 3:

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++ 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]