A method for deleting a session context, comprising: receiving, by a session management function entity, a packet data unit, PDU, session release request; and deleting, by the session management function entity based on the PDU session release request, a PDU session context that is stored in the session management function entity and that is of a terminal, wherein the PDU session context is a PDU session context that is not deleted after the terminal is abnormally deregistered: wherein the receiving, by a session management function entity, a PDU session release request comprises: receiving, by the session management function entity, the PDU session release request sent by a unified data management entity; or receiving, by the session management function entity, the PDU session release request sent by an access and mobility management function entity; or receiving, by the session management function entity, the PDU session release request sent by the policy control function entity; characterized in that the session management function entity is a session management function entity serving for the terminal before the terminal roams, and after the receiving, by a session management function entity, a PDU session release request, the method further comprises: sending, by the session management function entity, the PDU session release request to another session management function entity, wherein the PDU session release request is used to instruct the another session management function entity to delete a PDU session context that is stored in the another session management function entity and that is of the terminal, and the another session management function entity is a session management function entity serving for the terminal after the terminal roams. receiving, by a session management function entity, a packet data unit, PDU, session release request; and deleting, by the session management function entity based on the PDU session release request, a PDU session context that is stored in the session management function entity and that is of a terminal, wherein the PDU session context is a PDU session context that is not deleted after the terminal is abnormally deregistered: wherein the receiving, by a session management function entity, a PDU session release request comprises: receiving, by the session management function entity, the PDU session release request sent by a unified data management entity; or receiving, by the session management function entity, the PDU session release request sent by an access and mobility management function entity; or receiving, by the session management function entity, the PDU session release request sent by the policy control function entity; characterized in that the session management function entity is a session management function entity serving for the terminal before the terminal roams, and after the receiving, by a session management function entity, a PDU session release request, the method further comprises: sending, by the session management function entity, the PDU session release request to another session management function entity, wherein the PDU session release request is used to instruct the another session management function entity to delete a PDU session context that is stored in the another session management function entity and that is of the terminal, and the another session management function entity is a session management function entity serving for the terminal after the terminal roams. receiving, by the session management function entity, the PDU session release request sent by a unified data management entity; or receiving, by the session management function entity, the PDU session release request sent by an access and mobility management function entity; or receiving, by the session management function entity, the PDU session release request sent by the policy control function entity; characterized in that the session management function entity is a session management function entity serving for the terminal before the terminal roams, and after the receiving, by a session management function entity, a PDU session release request, the method further comprises: sending, by the session management function entity, the PDU session release request to another session management function entity, wherein the PDU session release request is used to instruct the another session management function entity to delete a PDU session context that is stored in the another session management function entity and that is of the terminal, and the another session management function entity is a session management function entity serving for the terminal after the terminal roams.