# cartLinesRemove Removes merchandise lines from an existing cart. ## Authentication > **Public Access**: Accessible with the public API key ## Mutation Structure ```graphql mutation { cartLinesRemove(id: String!, lineIds: [Id]!) { cart { # Cart fields } userErrors { # UserError fields } } } ``` ## Input Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | id | String! | Yes | The ID of the cart to remove lines from | | lineIds | [Id]! | Yes | A list of line item IDs to remove from the cart | ## Return Type [CartLinesRemovePayload](/reference/storefront/v1/objects/cart-lines-remove-payload) - Payload returned by the cartLinesRemove mutation. Contains the updated cart and any errors that occurred during the operation. ## Example ```graphql mutation { cartLinesRemove(id: "eyJhbGciOiJIUzI1NiJ9...", lineIds: ["gid://shopify/CartLine/1", "gid://shopify/CartLine/2"]) { cart { id lines { edges { node { id quantity } } } } userErrors { field message } } } ``` ## Related Types - [CartLinesRemovePayload](/reference/storefront/v1/objects/cart-lines-remove-payload)