# Source: https://docs.pinata.cloud/sdk/groups/public/remove-files.md

# Source: https://docs.pinata.cloud/sdk/groups/private/remove-files.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# removeFiles

> `org:groups:write`

Remove private files from a private group

## Usage

```typescript  theme={null}
import { PinataSDK } from "pinata";

const pinata = new PinataSDK({
  pinataJwt: process.env.PINATA_JWT!,
  pinataGateway: "example-gateway.mypinata.cloud",
});

const group = await pinata.groups.private.removeFiles({
	groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
	files: [
	  "7e18c4a4-9501-44de-8f81-403db7de0e39",
		"a606ef7e-70a0-40ad-9b8a-60563e009655"
	],
});
```

## Returns

```typescript  theme={null}
type UpdateGroupFilesResponse[] = {
	id: string;
	status: string;
};
```

## Parameters

### groupId

* Type: `string`

ID of the target Group to remove files from

```typescript {2} theme={null}
const group = await pinata.groups.private.removeFiles({
  groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
	files: [
	  "7e18c4a4-9501-44de-8f81-403db7de0e39",
		"a606ef7e-70a0-40ad-9b8a-60563e009655"
	],
});
```

### files

* Type: `string[]`

An array of file IDs as strings that you want to remove from the group

```typescript {3-6} theme={null}
const group = await pinata.groups.private.removeFiles({
  groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
	files: [
	  "7e18c4a4-9501-44de-8f81-403db7de0e39",
		"a606ef7e-70a0-40ad-9b8a-60563e009655"
	],
});
```