[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Deprovision bring your own IP\n=============================\n\nIf you no longer want to use your IP addresses in Google Cloud, you\ncan deprovision your BYOIP addresses.\n\nDifferent components take different times to deprovision.\n\n\n\u003cbr /\u003e\n\n### Roles\n\n\nTo get the permissions that\nyou need to complete the tasks in this guide,\n\nask your administrator to grant you the\n\n\n[Compute Public IP Admin](/iam/docs/roles-permissions/compute#compute.publicIpAdmin) (`roles/compute.publicIpAdmin`)\nIAM role on your project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nDeprovision BYOIP addresses\n---------------------------\n\nWhen you deprovision BYOIP addresses, complete the steps in the following\nsections in order.\n\n### Delete a public delegated prefix or sub-prefix\n\nYou can delete a public delegated prefix or sub-prefix if all IP addresses in\nthe prefix are not assigned to resources:\n\n- For IPv4 prefixes: the IP addresses are\n [unassigned](/compute/docs/ip-addresses/configure-static-external-ip-address#unassign_ip).\n When you delete the prefix, all associated IP addresses are deleted.\n\n- For IPv6 prefixes: no forwarding rules or subnets use IP address ranges from\n the sub-prefix.\n\nBefore you can delete a v2 regional public delegated prefix, the prefix must\nnot be advertised. Check the [status](/vpc/docs/create-pdp#pdp-status), and if\nneeded, [withdraw the\nprefix](/vpc/docs/manage-bgp-announcement#withdraw_advertisement_of_a_prefix).\n\nAfter the deletion process is started, you cannot make changes to\nthe public delegated prefix.\n\nYou can verify that the removal is pending by [checking the status of the public\ndelegated prefix](/vpc/docs/create-pdp#pdp-status). The status is `DELETING`\nuntil the public delegated prefix is deleted.\n\nWhen deletion is complete, the IP range from the deleted public delegated prefix\nis available in the public advertised prefix and can be delegated to a new\npublic delegated prefix. \n\n### Console\n\n1. In the Google Cloud console, go to the **Bring your own IP** page.\n\n [Go to Bring your own IP](https://console.cloud.google.com/networking/byoip)\n2. Click the public delegated prefix that you want to delete, and then\n click **Delete**.\n\n### gcloud\n\nTo delete a public delegated prefix or a sub-prefix, use the\n[`public-delegated-prefixes delete`\ncommand](/sdk/gcloud/reference/compute/public-delegated-prefixes/delete). \n\n```\ngcloud compute public-delegated-prefixes delete PDP_NAME \\\n --region=PDP_REGION\n```\n\nTo delete a global public delegated prefix or sub-prefix, replace\n`--region=`\u003cvar translate=\"no\"\u003ePDP_REGION\u003c/var\u003e with `--global`.\n\nIf the prefix was delegated to another project from this project, use the\n`--project=`\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e flag with the\n`public-delegated-prefixes delete` command to specify the project where the\nprefix is located.\n\nOr you can use the following command to delete a sub-prefix that is\ndelegated to another project without having to include that project in the\ncommand. \n\n```\ngcloud compute public-delegated-prefixes \\\n delegated-sub-prefixes \\\n delete SUB_PREFIX_NAME \\\n --public-delegated-prefix=PARENT_PDP_NAME \\\n --public-delegated-prefix-region=PDP_REGION\n```\n\nTo delete a global public delegated prefix or sub-prefix, replace\n`--public-delegated-prefix-region=`\u003cvar translate=\"no\"\u003ePDP_REGION\u003c/var\u003e with\n`--global-public-delegated-prefix`.\n\n### Delete a public advertised prefix\n\nYou can delete a public advertised prefix if it is not in use. After the\ndeletion process is started, you cannot make changes to the public advertised\nprefix. \n\n### Console\n\n1. In the Google Cloud console, go to the **Bring your own IP** page.\n\n [Go to Bring your own IP](https://console.cloud.google.com/networking/byoip)\n2. Select the public advertised prefix that you want to delete, and then\n click **Delete prefix**.\n\n### gcloud\n\nTo delete a public advertised prefix, use the [`public-advertised-prefixes\ndelete`\ncommand](/sdk/gcloud/reference/compute/public-advertised-prefixes/delete). \n\n```\ngcloud compute public-advertised-prefixes delete PAP_NAME \\\n```\n\nYou can verify that the removal is pending by [checking the status of the\npublic advertised prefix](/vpc/docs/create-pap#pap-status). The status is\n`PREFIX_REMOVAL_IN_PROGRESS` until the public advertised prefix is deleted.\n\n### Remove a ROA\n\nAfter you successfully delete a public advertised prefix, you don't need to\nremove the ROA that points to the ASN for Google Cloud. If you want to\nremove this ROA, you must wait 14 days after deleting the public advertised\nprefix before you remove the ROA. This waiting period gives Google Cloud\ntime to update configurations in order to stop advertising your IP address\nrange."]]