Fix the Fish shell 'terminated by signal SIGKILL' error
By Flavio Copes
Learn how to fix the Fish shell error terminated by signal SIGKILL Forced quit, which I hit running npx, by closing the terminal and opening a new shell.
If Fish tells you a command was terminated by signal SIGKILL (Forced quit), the operating system killed the process you were running. Fish is just reporting it. In my case, closing the terminal and starting a new shell was enough to fix it.
Here’s the full story.
I was doing some work with my Fish shell when after a while I hit a problem.
I ran the command npx prisma migrate dev and I was met with this error:
fish: 'npx prisma migrate dev' terminated by signal SIGKILL (Forced quit)
What fixed the issue for me was closing the terminal and starting a new Fish shell.
What does SIGKILL mean?
Signals are messages the operating system sends to processes. Most of them, like SIGTERM or SIGINT (what you send with ctrl-C), give the process a chance to clean up and exit on its own terms.
SIGKILL is different. It’s signal number 9, and a process cannot catch it or ignore it. The kernel terminates it immediately, no questions asked.
This tells you something useful: the problem was not a bug in npx or Prisma crashing. Something outside the process decided to kill it.
Why does it happen?
The most common reason is memory pressure. When your Mac runs low on memory, the system can kill processes to stay alive. Node.js processes like npx can use a lot of memory, so they’re good candidates.
On Apple Silicon Macs, macOS also uses SIGKILL for binaries with a broken or missing code signature. If one specific command gets killed instantly every single time you run it, a corrupted install is a likely suspect.
And of course, another process (or someone with access to the machine) can send a kill -9 too.
What to try
Start with the easy fix that worked for me: close the terminal and open a new Fish shell. A long-running terminal session can drag along a bad state, and a fresh one costs you nothing.
If that’s not enough, open Activity Monitor and check the memory pressure graph. Close a few heavy apps and run the command again.
If the same command keeps getting killed while everything else works, reinstall it. For Node tools that means reinstalling Node.js or the specific package, so you get a fresh, valid binary.
Want me to talk about your product? You can sponsor this site.
Related posts about mac: