2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [bitburner ](./bitburner.md ) > [NS ](./bitburner.ns.md ) > [kill ](./bitburner.ns.kill.md )
## NS.kill() method
2021-11-03 23:16:10 +01:00
Terminate another script.
2021-10-30 18:34:14 +02:00
< b > Signature:< / b >
```typescript
2021-11-04 01:19:52 +01:00
kill(script: string | number, host: string, ...args: string[]): boolean;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-11-04 01:19:52 +01:00
| script | string \| number | Filename or pid of the script to kill |
2021-10-30 21:46:34 +02:00
| host | string | Hostname of the server on which to kill the script. |
2021-10-30 18:34:14 +02:00
| args | string\[\] | Arguments to identify which script to kill. |
< b > Returns:< / b >
boolean
True if the script is successfully killed, and false otherwise.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 0.5 GB
2021-10-30 18:34:14 +02:00
2021-11-03 23:16:10 +01:00
Kills the script on the target server specified by the script’ s name and arguments. Remember that scripts are uniquely identified by both their name and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same code.
2021-10-30 18:34:14 +02:00
## Example 1
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
//The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:
kill("foo.script", "foodnstuff");
```
## Example 2
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
//The following will try to kill a script named foo.script on the current server that was ran with no arguments:
kill("foo.script", getHostname());
```
## Example 3
2021-10-30 21:46:34 +02:00
```ts
2021-10-30 18:34:14 +02:00
//The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:
kill("foo.script", getHostname(), 1, "foodnstuff");
```