Delete All Oracle User Objects

If you don't have system level access, and want to clean your oracle schema, the following sql will produce a series of drop statments, which can then be executed. Not all of them will execute - if you drop with cascade, dropping the PK_* indices will fail.

select 'drop '||object_type||' '|| object_name||  DECODE(OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS;',';')from user_objects;

Confirm with:

select * from user_objects

Purge out the recyclebin if not needed:

purge recyclebin;

Comment