AT+CMGD - Delete a Received Message

The AT+CMGD command deletes a received SMS message from the GSM modem. You can retrieve the index number of the message with the AT+CMGL command.

Command Positive Response
AT+CMGD=<index><CR> OK

Parameters
<index>: Index number of the message
<CR>: ASCII character 13

Example
Set the GSM modem to Text Mode SMS, list all received messages and remove the messages from the GSM modem.

AT+CMGF=1
OK
AT+CMGL="ALL"
+CMGL: 1,"REC UNREAD","+31628870634",,"11/01/09,10:26:26+04"
This is text message 1
+CMGL: 2,"REC UNREAD","+31628870634",,"11/01/09,10:26:49+04"
This is text message 2
OK
AT+CMGD=1
OK
AT+CMGD=2
OK

See also
AT+CMGF - Set SMS Text Mode or SMS PDU Mode
AT+CMGL - List Received Messages