deleting all addresses in Palo Alto Networks firewall

if you somehow end up having hundreds of address objects in a PAN firewall and you would like to delete all of them, good luck!
probably to prevent accidental removal there is no way on GUI as of now on 7.1.x releases (or I don’t know yet)
but if you want to you can use the following CLI option.

copy the output you get on the previous “show address” command and paste into a file e.g “address.txt” in a Linux host then do
grab the first 3 lines

for example our file may contain the followings;

by doing this you create the delete statements of address objects. Your output should be like this

now you need to paste this on PAN cli. Depending on the number of objects you may need to enable scripting mode

and then paste the delete commands and commit. That should be it!

You have a feedback?