As per the information in the manual, the main difference is:
The CLEANUP ONLY PAGES option will search for and free committed pseudo empty pages. A committed pseudo empty page is one where all the keys on the page are marked as deleted and all these deletions are known to be committed. The number of pseudo empty pages in an indexes can be determined by running RUNSTATS and looking at the NUM EMPTY LEAFS column in SYSCAT.INDEXES. The PAGES option will clean the NUM EMPTY LEAFS if they are determined to be committed.
The CLEANUP ONLY ALL option will free committed pseudo empty pages, as well as remove committed pseudo deleted keys from pages that are not pseudo empty. < removed some info about merging pages > The number of pseudo deleted keys in an index , excluding those on pseudo empty pages, can be determined by running RUNSTATS and then selecting the NUMRIDS DELETED from SYSCAT.INDEXES. The ALL option will clean the NUMRIDS DELETED and the NUM EMPTY LEAFS if they are determined to be committed.
IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
CLEANUP ONLY
- PAGES will cleanup committed pseudo empty pages (pages on which all keys are marked deleted and committed) -> NUM_EMPTY_LEAFS (if committed)
- ALL will do what PAGES option does plus cleanup committed pseudo deleted keys -> NUM_EMPTY_LEAFS + NUMRIDS_DELETED (if committed)