---
name: "delete_file"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/delete_file/3alleg4"
---

# delete\_file(3alleg4)

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.
