How start Atom without loading last files/projects? e.g. How delete storage/editor-* files on startup?

How start Atom without loading last files/projects?

I’d like to always start Atom with a clean slate rather than with old laundry.

I think this can be done by erasing $HOME/.atom/storage/editor-* files.

Is there possibly a way to always run a shell command like
"rm $HOME/.atom/storage/editor-*" at startup or
is there a less hackish way to do the same?




Settings > Open Empty Editor On Start


Thank you very much! It still starts out with the directory view on the left
from the last project (directory) opened. Is there a way to turn that off
when you start? I don’t want any residual state info to be present.


1 Like


I thought something was amiss. That setting doesn’t do anything! I just
checked! If you quit Atom with a file still open it restarts with that file loaded.
I noticed there is an old thread about this being a bug. Seems
it hasn’t been fixed yet?


That setting does do something but only in the situation where Atom opens with no project. It determines whether Atom opens with an empty window or a window with an empty file in it. It is rare to start Atom with no project, though, so yes, the setting is somewhat misleading.

Regarding deleting the contents of ~/.atom/storage, we’re moving to a new system of storing the serialized state as part of the Crash Recovery functionality in v1.7-beta. This includes a --clear-window-state option for the atom executable that equates to the deletion of the contents of the ~/.atom/storage directory.


Thanks! I tried the beta and that switch you mentioned works.

It still opens with the tree view of the old directory I was in before I exited
Atom last time.

Is there a switch to also NOT show the old tree and/or show a new unnamed
empty file as well?

Thanks again.


No, there currently isn’t anything like this. Fixing up all the various launch scenarios is something we have on the list:

Should I wait for these features to show up on the settings menu
or should I make a custom package? Isn’t it the “Atom Way” to
do these sorts of customizations in packages anyway? How does
that sound?

One could make a package to remove project directories from tree view,
open new files, etc. easy right?


It depends on what you want exactly. You might look at the project manager packages that already exist.

Most of non-settings customization is done in ~/.atom files like

In Preferences > Core there’s a dropdown “Restore Previous Windows on Start” which you can set to “no”

This is the solution.
$ atom --clear-window-state


Unfortunately none of these solutions work on Windows 10.
Current build: Atom 1.41.0

See GitHub Issue #19716 and Atom Discussion.

1 Like

I can only clear it out by selecting the project folder that appears when I open Atom and right click on it and choose: File > Remove Project Folder. Now I have a clean slate to open an existing folder by choosing: File > Add Project Folder. If the project is brand new, and the folder doesn’t already exist, I create a new folder in Explorer (obviously I’m talking Windows now) and then open it the same way I would an existing folder: File > Add Project Folder. I know this is not ideal, but it appears to be the only way to start fresh that I know of.

I came here cos Atom was freezing up. This worked to clear the project state.

atom --new-window

I guess this might help: