Here is a Visual Lisp code to delete all the named page setup :
(defun C:DelPgSetups ( / appAcad colPgSetups docCurrent objPgSetup)
(vl-load-com)
;get the ACAD application object
(setq appAcad (vlax-get-acad-object))
;get the current drawing
(setq docCurrent (vla-get-ActiveDocument appAcad))
;get the ACAD_PLOTSETTINGS dictionary
(setq colPgSetups (vla-get-PlotConfigurations docCurrent))
; ask for confirmation before deleting
(initget 1 "Y YES N NO")
(setq answer
(substr
(getkword
"\nThis will erase all the named page setups ?
Do you want to continue ? [Yes/No]: "
)
1 1
)
)
; if ok, continue to delete all the named page setups
(if (= answer "Y")
(progn
;;get each page setup in the
;ACAD_PLOTSETTINGS dictionary
(vlax-for objPgSetup colPgSetups
(princ
(strcat "\nDeleting " (vla-get-name objPgSetup))
)
;delete the page setup from the dictionary
(vla-delete objPgSetup)
;release the page setup
(vlax-release-object objPgSetup)
);vlax-for
(princ "\n\nDone.")
)
)
;;release objects from memory
(vlax-release-object colPgSetups)
(vlax-release-object docCurrent)
(vlax-release-object appAcad)
(princ)
);End of defun DelPgSetups