> 2.11.3 | Deleting SMS

> This section comprises the subsections Description, Used AT Commands, Flow Chart, Hints and Example. To move to these subsections please use the Navigation Frame or the appropriate buttons on the toolbar.

> 2.11.3.1 | Description

> This chapter describes all the steps required to delete a short message from the preferred memory chosen by the init setting (using AT+CPMS).
> The AT+CMGL command can be used optionally before deleting the SMS.

> 2.11.3.2 | Used AT commands

> Command | Explanation
> AT+CMGL | List SMS messages from preferred store (optional)
> AT+CMGD | Delete SMS message (mandatory)

> For further details about the commands see [2].

> 2.11.3.3 | Flow chart

> Figure 79: Deleting SMS

> 2.11.3.4 | Hints

> • | A short message can be deleted anytime, however in general, if not deleting the complete memory, it is

> • | necessary to know the index. Therefore it is often recommended to execute the AT+CMGL command before deletion.

> • | You can delete short messages regardless of their state, for example received unread messages, received read messages etc.

> • | If no SMS is stored, an empty list and "OK" will be returned.

> 2.11.3.5 | Example

> ***************************************
> Comment: Deleting SMS
> ***************************************
> ***************************************
> Comment: List SMS with all statuses (PDU mode)
> ***************************************
> Subscr 1 Send: AT+CMGL=4
> Subscr 1 Receive: AT+CMGL=4
> Subscr 1 Receive: +CMGL: 6,2,,30
> Subscr 1 Receive: 0011000A9171798762130000A713C8329BFD6681D0EF3B282C2F83F2EFFA0F
> Subscr 1 Receive: +CMGL: 11,1,,36
> Subscr 1 Receive: 0791947106004013240C9194715982699000003080413115748013C8329BFD6681D0E
> F3B282C2F83F2EFFA0F
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Delete SMS at index 1
> ***************************************
> Subscr 1 Send: AT+CMGD=1
> Subscr 1 Receive: AT+CMGD=1
> Subscr 1 Receive: OK