Don't open previously opened files on new start


I think it’s interesting to note that:

  • When I don’t want Atom to remember files, there is no way to turn it off without resorting to hacks (as @rubysolo pointed out above).
  • When Atom should be remembering files, it rudely dumps them (the whole project in fact) and forgets about them entirely; see .

So Atom basically does the opposite of what I want it to do in both cases.


I would also like a way of doing this without resorting to hacks :slight_smile:


Running rm ~/.atom/storage/editor-* doesn’t seem to work anymore.

I accidentally opened a large file that was just one line which caused atom to freeze.
After I closed it and opened it on the folder again it just reopened the file and froze again.
I tried rm ~/.atom/storage/editor-* and still the same problem.

It would be nice to have a way to either disable this or for problems like mine a reliable way to reset the opened files.


There is.


my has only one line:"")
it will meet your need.
with this, atom will try to open the file “” but can’t
so atom open a new window with no file opened and even no tree-view


Nice. Combining this with olmokramer’s way of closing previous tabs get’s the behavior that I want when I open a previously opened directory: no open files.

My now looks like this:"")

process.nextTick ->
  atom.workspace.getPaneItems().forEach ->

(It still opens tree view when I open a single file though, but most of the time I can live with that.)


None of the above workarounds work for me at the moment; but this does. Replace ~/.atom/storage/application.json with:

    "initialPaths": []

Then start Atom, and get one blank/empty editor.

From a bug-noting standpoint, my applicaton.json content is updated when I exit Atom with 53 repetions of the empty initialPaths stanza.


This is something you should report as an issue on the Atom repo, along with your OS, version of Atom, and whether it happens when you started Atom with atom --safe.


@alexkolson This is happening to me also. Did you find a solution on how I can make it open a blank file when I open Atom? It’s really annoying to have my last session restored :smiley:


+1 for a way to always open a nice, fresh, empty editor.


Atom has had a setting to control whether to restore the last session for a number of releases. The setting has always defaulted to enabled and it has been exposed in the GUI in v1.14-beta:


This setting doesn’t work for me… I’ll try out the new beta, according to someone in this topic it’s a known bug.


Open Empty Editor On Start is a different setting. In Atom 1.14 the description for Open Empty Editor On Start was changed and Restore Previous Window On Start was added to the GUI. You can read about the changes in the PR or try it out in beta:


My solution is to loop through the TextEditor objects and call destroy() on them at the beginning of coffee.init.

Then I add a directory to the project tree and open my “to do” list.

editor_list = atom.workspace.getTextEditors()
for text_editor in editor_list



or remove IndexedDB in (C:\Users\...\AppData\Roaming\Atom) for me works fine, but not checked what else will reset


In the terminal, atom --clear-window-state clears the cache for opened files.

It’s not on startup as OP wanted, but since this page is the first result on google for “how to get rid of atom opened files” I figure I might as well put it here. (I opened a large file and atom crashes on startup every time)


any updates?

If I open a.txt under folder myFolder, then I exit Atom by clicking X button.

A moment latter, I open b.txt under same folder, then Atom shows a.txt and b.txt.

A workaround I found is : click close all tabs before exit each time. This is not good.

We’re looking for a good solution.


Are you perhaps looking for this setting?


Thanks for your reply.

This setting doesn’t work. My case still happen even I set it to no.


Even if it doesn’t reopen previous windows when started up, Atom will still remember which tabs you had open. You can wipe its memory by starting Atom from the command line with the command atom --clear-window-state, but I know of no way to tell Atom to stop remembering open files completely.