Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThis webpage documents the process of deleting a function within a specified project using an HTTP DELETE request.\u003c/p\u003e\n"],["\u003cp\u003eThe function to be deleted is identified by its unique name, structured as \u003ccode\u003eprojects/{project}/locations/{location}/functions/{function}\u003c/code\u003e, which is a required path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request needs to be made with the correct authorization scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body for this function must remain empty, and upon successful deletion, the response body will contain information about the operation.\u003c/p\u003e\n"],["\u003cp\u003eDeleting the function will also update any associated triggers to remove this function.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.functions.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.\n\n### HTTP request\n\n`DELETE https://cloudfunctions.googleapis.com/v1/{name}`\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/functions/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]