---
title: "deleteAttachment"
canonical: "https://support.appfire.com/space/PSCONF/15304411/deleteAttachment"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | deleteAttachment(pageId, attachmentName) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Deletes the attachment for a given id or for a specified page and file name.

Deletes the attachment for a given id or for a specified page and file name.

## Return Type

**Boolean (true/false)**

Returns "true" if the attachment was deleted successfully and "false" otherwise. If returned "false" check the log for a detailed reason on why it failed.

## Example

```javascript
deleteAttachment(11801, "attachmentToDelete.txt");
```

> ⚠️ If you have multiple attachments on an issue with the same file name, all of them will be deleted.

## See also

> Macro (contentbylabel)