Skip to main content
By default, this command requires the Manage Server and Manage Messages permissions. This command requires the bot to have the Manage Messages permission.
Bulk-delete messages from the current channel.

Syntax

/purge [count] [first] [last] [types] [match] [case-sensitive]
You must specify count, first, and last in one of the following configurations:
  • <count> — select the last <count> messages
  • <first> — select messages starting from <first> and ending at the most recent message
  • <count> <first> — select up to <count> messages starting from <first>
  • <count> <last> — select up to <count> messages ending with <last> as the most recent
  • <first> <last> — select messages between <first> and <last> (inclusive)
ParameterInformation
countThe number of messages to select.
firstThe first/earliest message to select.
lastThe last/most recent message to select.
typesThe types of authors from whom to delete messages:
  • user accounts — only delete messages sent by regular user accounts
  • bot accounts — only delete messages sent by bot accounts (i.e. not webhooks)
  • webhooks — only delete messages sent by webhooks
matchIf specified, only delete messages matching the specified text.
case-sensitiveIf true, match is case-sensitive (this has no effect if match is not set).
Last modified on February 1, 2026