---
name: "delete_file"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/delete_file"
---

# delete\_file(3alleg)

Removes a file from the disk. Allegro game programming library.

## NAME

delete\_file - Removes a file from the disk. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int delete\_file(const char \*filename);**

## DESCRIPTION

Removes a file from the disk. You can't delete directories, though.

## RETURN VALUE

Returns zero on success, non-zero on failure.
