Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

fkill

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fkill

Fabulously kill processes. Cross-platform.

latest
Source
npmnpm
Version
10.0.3
Version published
Weekly downloads
238K
-0.07%
Maintainers
1
Weekly downloads
 
Created
Source


fkill


Fabulously kill processes. Cross-platform.

Works on macOS (10.13 or later), Linux, Windows.

Install

npm install fkill

Usage

import fkill from 'fkill';

await fkill(1337);
console.log('Killed process');

fkill('Safari');
fkill(':8080');

fkill([1337, 'Safari', ':8080']);

API

fkill(input, options?)

Returns a promise that resolves when the processes are killed.

input

Type: number | string | Array<number | string>

One or more process IDs/names/ports to kill.

To kill a port, prefix it with a colon. For example: :8080.

On Windows, process extensions are optional. For example, both fkill('notepad') and fkill('notepad.exe') work.

options

Type: object

force

Type: boolean
Default: false

Force kill the processes.

forceAfterTimeout

Type: number
Default: undefined

Force kill processes that did not exit within the given number of milliseconds.

tree

Type: boolean
Default: true

Kill all child processes along with the parent process. (Windows only)

ignoreCase

Type: boolean
Default: false

Ignore capitalization when killing a process.

Note that the case is always ignored on Windows.

silent

Type: boolean
Default: false

Suppress all error messages. For example: Process doesn't exist.

waitForExit

Type: number
Default: undefined

Wait for processes to exit before returning.

Specifies the maximum time to wait in milliseconds. If processes haven't exited by then, an error is thrown (unless silent: true).

// Wait up to 2 seconds for Chrome to exit
await fkill('chrome', {waitForExit: 2000});

// Wait up to 5 seconds for database to shutdown gracefully
await fkill(dbPid, {waitForExit: 5000});
  • fkill-cli - CLI for this module
  • alfred-fkill - Alfred workflow for this module

Keywords

fkill

FAQs

Package last updated on 14 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts