C remove() function The remove() function is used to delete a given file, named by the pathname pointed to by path. Return value from remove() function: The remove() function returns 0 if it successfully deletes the file. A nonzero return value indicates an error.