# PVK_remove( ): Remove a Record

> Source: https://manual.pvxplus.com/c-library-file-io-routines/file-io-routines/remove

## Format

int **PVK_remove**(int *fh*, char \**keybfr*, int *keysz*);

***Where:***

|  |  |
| --- | --- |
| *fh* | File handle returned from a prior call to **[PVK_OpenExt( )](https://manual.pvxplus.com/c-library-file-io-routines/file-io-routines/openext)** |
| *keybfr* | Pointer to a buffer containing the external key of the record to remove |
| *keysz* | Size of the primary key in bytes |

## Description

**PVK_remove(** **)** is used to remove a record from a PxPlus keyed file. The length and value of the primary key for the record must be specified. Records can only be removed from a file using the primary key. Alternate keys cannot be used. This function cannot be used with indexed files.

If successful, this function will return 0; otherwise, it will return -1.
