You can delete an entire edition in a single operation, by means of the command to execute in the Command prompt window from the folder where GN4 resides (all in one line)
srv4 variant (to be run on the IIS server)
srv4 spike -ids [id of the edition]
-extend master.editionRef,page.editionRef,extDoc.editionRef,pageLayer.pages,article.pageLayers.pageRef,txtGeometry.txtRef,txtGeometry.jumps,pagePreview.pageRef,webComment.objectRef
-extendunref linkObject.pageLayers.editionRef,linkObject.pageLayers.pageRef,linkObject.pageLayers.layerRef,pageLayer.txtGeos
-unref linkObject.assigns,linkObject.assigns.pageRef,linkObject.assigns.extDocRef
cmd4 variant (can be run on the IIS server or from clients)
cmd4 spike -ids [id of the edition]
-extend master.editionRef,page.editionRef,extDoc.editionRef,pageLayer.pages,article.pageLayers.pageRef,txtGeometry.txtRef,txtGeometry.jumps,pagePreview.pageRef,webComment.objectRef
-extendunref linkObject.pageLayers.editionRef,linkObject.pageLayers.pageRef,linkObject.pageLayers.layerRef,pageLayer.txtGeos
-unref linkObject.assigns,linkObject.assigns.pageRef,linkObject.assigns.extDocRef
-recurse
-srvurl xxxx
-username yyyy -password zzzz
where xxxx is the URL of the server to connect to (in version 2.5 and newer, the URL is http://<myserver>/<myWebApp>/. In version prior to 2.5, the URL is the address of the Web service to connect to, e.g. http://<myserver>/<myWebApp>/Adminsrv.asmx.), the yyyy is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and zzzz is the password.
Note: from the version 1.5 it is necessary to extend the spike/unspike also to the pagePreview objects by adding pagePreview.pageRef to the -extend.
Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.
The above example deletes the edition with id [id of the edition] (or editions if more that one id is specified), deleting at the same time all the master pages, pages and layers in the edition. Images linked to master pages are left untouched.
Images, text and articles linked to pages in the edition are deleted if they are not in a partition with 'extendSpike' set to false AND if they are not linked to any other page or master page.
If images, texts or articles are either in a partition with 'extendSpike' set to false OR if they are linked to other pages or master page they are simply unlinked.
Here is how the various objects fit together (and hence the reason of the parameters in the spike command above):
See also
Delete editions with shared layers by command line
Deleting individual pages and layers by command line
Spike REST call