Atom is loading old version of a file even after a restart



I’m running Atom 0.205. At first, I thought I was going crazy, but I restarted Atom multiple time, and I’m seeing an older version of the file that was my filesystem contain (verified with GIT, Sublime and VIM just in case).

Is there anyway I can clear Atom’s cache? I tried closing the file in Atom, closing Atom completely, and nothing seem to work.


Have you tried following the steps in the debugging guide? Can you reproduce this in safe mode? (atom --safe)


You can either clear the whole content of the ~/.atom/storage directory, or if you only want to clear the saved state of this specific project you can do something like this:

cd ~/.atom/storage

grep -R 'your-project-name' . | less

You should see something like that:

./editor-00da0f465f196a624dbde2071e96743b1f0994f9:{"mode":"editor","version":1, ...

This command allow us to find which storage file correspond to the project we want to clear.
Then you can clear just this project state by doing:

rm ./editor-00da0f465f196a624dbde2071e96743b1f0994f9


Thanks @abe deleting the storage of the project did it.

Edit: merci beaucoup :slight_smile:


BTW, I remember sawing this kind of things when working on a file, leaving it unsaved when quitting, and then restarting Atom after having modifying it in another editor. Atom is storing the buffer content on save to load it faster at the next start, and I believe it checks whether the files was changed or not, but if the file was quit unsaved then it seems logical that it keep the unsaved changes.