11 thoughts on “I cannot quit Atom

  1. Have you tried :q!? 🤣

    Just kidding. It seems like it might be frozen. Are you able to kill it from the task manager?

  2. FWIW, I’ve only recently run into this and have come up with repeatable steps to make it happen.

    Normally I open a project in Atom via a terminal with atom ., and I can successfully quit the app when I’m done with that project. It also works fine if I launch Atom directly from Finder or whatever and work on the last open project that was automatically loaded. If I launch with one project, additionally open another project without closing the first, I can still quit.

    The problem happens when I close the window for the first loaded project. After that, whether I open anything else or not, the app will not quit normally. I have to use Activity Monitor to force quit.

  3. I was also having this issue. Didn’t happen prior to a week ago. No new packages installed, upgraded to Atom 1.50.0, but that didn’t fix it. Also just figured out how to get around it, and what it takes to reproduce the issue.

    Whenever I opened Atom, it would open to the same project. Let’s called that Project A. If I close that window, leaving no Atom windows open, and then open a different project(Project B), then I can’t quit. When I force quit, then reopen atom, it opens with Project A again.

    Now, if I open Project B while Project A is still open, and then close Project A, suddenly I can quit normally without issue.

    Can anyone else confirm if this works for them too?

  4. @HCLarsen Can confirm. Open one project (A), can still quit. However, if I close all windows for Project A and open another project (B), I can no longer quit. Have to use Activity Monitor.

    If I still have Project A open when I open Project B, I am still able to quit, even if I close all Project A windows first.

  5. Was still experiencing this issue even with all packages disabled. I got so sick of it that I deleted my ~/Library/Application Support/Atom folder entirely, which seems to have at least temporarily fixed the issue, at the cost of loosing my “Reopen Project” history. I checked, and my Themes, Packages, Config etc seem to be intact, which is consistent with my understanding they’re stored in ~/.atom

    Not advising this as a fix necessarily, but seems to be working for me at least.

  6. This should be a reliable workaround

    in your init.coffee add

    atom.commands.add '*', 'application:delayed-self-murder', (options) ->
        # first try normal quitting
        waitTime = 500 #half a second
        # after a certain amount of time, murder atom
        setTimeout ->
            process = require("process")
            childProcess =  require("child_process")
            childProcess.exec("kill -9 #{process.ppid}")
        , waitTime

    in your keymap.cson add

        'cmd-q': 'application:delayed-self-murder'

    Reload the window (or restart Atom) and now cmd+q should always work (note: unsaved work, undo buffer, and restoring windows probably not guaranteed)
    If you don’t care about unsaved work, you can change the waitTime = 500 to waitTime = 0

  7. Also, when it fails to quit, it can actually prevent shutdown and you can’t Force Quit it either. I have had to physically power off my Mac laptop. This is not ok.

  8. Hi folks. The fix for this is included in Atom Nightly (as of Atom Nightly 1.56.0-nightly1, released on the 8th of January), and should be in Atom Beta (1.56) soon. Then Atom stable 1.56.0 some time after that.

    (Usually there is about a month or so between new minor releases on each channel).

    You can get Atom Nightly here with the fix: https://atom.io/nightly although it’s not as stable as Beta or stable releases, and it’s possible it might not work so well for a day or two if you leave automatic updates turned on.

    Originally posted by @DeeDeeG in #17672 (comment)