dfx stop
Reference
Use the dfx killall command to forcibly kill all dfx-related process.
Basic usage
dfx killall [flag]
Examples
You can kill a stuck process that is not responding to dfx stop with this command:
dfx killall
This may impact IDE plugins, including from other versions of dfx. For ordinary usage dfx stop should be preferred.