# taskkill

> Wrapper for the Windows `taskkill` command. Ends one or more tasks or processes.

Latest version **5.0.0** (published 2022-06-24) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 28/100 (F)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2022-06-24 |
| First published | 2015-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/taskkill) |
| Module format | ESM |
| Node | >=14.16 |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | taskkill, task, kill, terminate, windows, win, win32, pid, id, process, processes, services |

## Links

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

## Dependencies (1)

- [execa](https://npm.io/package/execa.md) ^6.1.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 5.0.0 (latest) — 2022-06-24
- 4.0.0 — 2021-08-12
- 3.1.0 — 2019-11-13
- 3.0.0 — 2019-05-27
- 2.0.0 — 2016-01-08
- 1.0.0 — 2015-05-31

## README

# taskkill

> Wrapper for the Windows [`taskkill`](https://technet.microsoft.com/en-us/library/bb491009.aspx) command. Ends one or more tasks or processes.

## Install

```sh
npm install taskkill
```

## Usage

```js
import {taskkill} from 'taskkill';

await taskkill([pid, pid2]);
```

## API

See the [`taskkill` docs](https://technet.microsoft.com/en-us/library/bb491009.aspx) for more.

### taskkill(input, options?)

Kill asynchronously.

Returns a `Promise`.

### taskkillSync(input, options?)

Kill synchronously.

### Arguments

#### input

Type: `string | number | string[] | number[]`

One or more process IDs or image names, but not mixed.

#### options

The `system`, `username`, `password` options are mutually inclusive.

##### system

Type: `string`

Name or IP address of a remote computer (do not use backslashes). The default is the local computer.

##### username

Type: `string`

A user specified by `User` or `Domain\User`.

The default is the permissions of the current logged on user on the computer issuing the command.

##### password

Type: `string`

Password of the user account for the specified `username`.

##### filter

Type: `string`

Types of processes to include or exclude from termination.

See the [`taskkill` docs](https://technet.microsoft.com/en-us/library/bb491009.aspx) for supported filters.

##### force

Type: `boolean`

Forcefully terminate processes. Ignored for remote processes as all remote processes are forcefully terminated.

##### tree

Type: `boolean`

Terminate all child processes along with the parent process, commonly known as a tree kill.

## Related

- [tasklist](https://github.com/sindresorhus/tasklist) - Wrapper for the Windows `tasklist` command
- [fkill](https://github.com/sindresorhus/fkill) - Force kill processes, cross-platform

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