If you need to clean up your archive, deleting some images and their references in pages and stories, some stories and their references in pages, and some pages, use the extend option of the spike command, e.g.
Delete images and their references in pages and stories
cmd4 spike -conditions gn4:image -extend document.images,story.objs -username xxxx -password -yyyy
Delete stories and their references in pages
cmd4 spike -conditions gn4:story -extend document.stories -username xxxx -password -yyyy
where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password.
Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.