# Sandbox.ScriptSystem.RemoveFile

```csharp
FileLoadResult RemoveFile(string filePath)
```

Removes a named script and its declarations without deleting a file or undoing previous side effects.
Hosts replicate shared-script removals. Other scripts retain their state, and a missing name is a no-op.
Clients receiving the host's scripts cannot call this method. A later resource scan can restore a disk-backed script.
Publication failures are reported in the result, as with `M:Sandbox.ScriptSystem.LoadFiles(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String})`.

### Parameters

- `filePath` (`string`)

### Returns

`FileLoadResult`

Declared in [Sandbox.ScriptSystem](/api/Sandbox.ScriptSystem).
Assembly: `Sandbox.Engine`.
