--- title: cartLinesRemove - Storefront API description: Removes one or more merchandise lines from the cart. api_version: 2025-10 api_name: storefront type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesRemove md: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesRemove.md --- # cart​Lines​Remove mutation Removes one or more merchandise lines from the cart. ## Arguments * cart​Id [ID!](https://shopify.dev/docs/api/storefront/latest/scalars/ID) required The ID of the cart. * line​Ids [\[ID!\]!](https://shopify.dev/docs/api/storefront/latest/scalars/ID) required The merchandise line IDs to remove. The input must not contain more than `250` values. *** ## Cart​Lines​Remove​Payload returns * cart [Cart](https://shopify.dev/docs/api/storefront/latest/objects/Cart) The updated cart. * user​Errors [\[Cart​User​Error!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartUserError) non-null The list of errors that occurred from executing the mutation. * warnings [\[Cart​Warning!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartWarning) non-null A list of warnings that occurred during the mutation. *** ## Examples * ### cartLinesRemove reference ## Mutation Reference ```graphql mutation cartLinesRemove($cartId: ID!, $lineIds: [ID!]!) { cartLinesRemove(cartId: $cartId, lineIds: $lineIds) { cart { # Cart fields } userErrors { field message } warnings { # CartWarning fields } } } ``` ## Input ```json { "cartId": "gid://shopify//10079785100", "lineIds": [ "gid://shopify//10079785100" ] } ```