# fkill

> Fabulously kill processes. Cross-platform.

Latest version **10.0.3** (published 2026-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install fkill
pnpm add fkill
yarn add fkill
bun add fkill
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 10.0.3 |
| Published | 2026-01-14 |
| First published | 2015-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 5 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 798 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | fkill, kill, killing, killall, taskkill, sigkill, sigterm, force, exit, zap, die, force, ps, proc, terminate |

## Links

- npm: https://www.npmjs.com/package/fkill
- Repository: https://github.com/sindresorhus/fkill
- Homepage: https://github.com/sindresorhus/fkill#readme
- Issues: https://github.com/sindresorhus/fkill/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/fkill

## Dependencies (5)

- [execa](https://npm.io/package/execa.md) ^9.6.0
- [ps-list](https://npm.io/package/ps-list.md) ^9.0.0
- [pid-port](https://npm.io/package/pid-port.md) ^2.0.0
- [taskkill](https://npm.io/package/taskkill.md) ^5.0.0
- [process-exists](https://npm.io/package/process-exists.md) ^5.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 10.0.3 (latest) — 2026-01-14
- 10.0.2 — 2026-01-14
- 10.0.1 — 2025-11-13
- 10.0.0 — 2025-11-09
- 9.0.0 — 2023-11-07
- 8.1.1 — 2023-07-21
- 8.1.0 — 2022-12-13
- 8.0.1 — 2022-04-29
- 8.0.0 — 2021-10-14
- 7.2.1 — 2021-07-09
- 7.2.0 — 2021-07-09
- 7.1.1 — 2021-03-29
- 7.1.0 — 2020-12-27
- 7.0.1 — 2020-05-04
- 7.0.0 — 2020-02-12
- … 14 more at https://npm.io/package/fkill/versions

## README

<h1 align="center">
	<br>
	<img width="360" src="media/logo.svg" alt="fkill">
	<br>
	<br>
	<br>
</h1>

> Fabulously kill processes. Cross-platform.

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

## Install

```sh
npm install fkill
```

## Usage

```js
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`).

```js
// 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});
```

## Related

- [fkill-cli](https://github.com/sindresorhus/fkill-cli) - CLI for this module
- [alfred-fkill](https://github.com/SamVerschueren/alfred-fkill) - Alfred workflow for this module

---
_Source: https://npm.io/package/fkill · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
