to clean unnecessary files and folders

I want to clean used solaris OS and then to give another developer.

How can I understand that difference between system file/folder and others.
I want to delete apart from the files/folders.
I need tools or scripts like disk-cleanup or something like that.

#usr>du -s -h *
 6.6M    4lib
   1K    5bin
 348K    SUNWale
   1K    X
 1.2M    X11
   1K    X11R6
   1K    adm
  28M    apache
  16M    apache2
 106M    appserver
 172K    aset
  43M    bin
 2.5M    ccs
 6.3M    demo
   1K    dict
  82M    dt
   1K    games
   6K    gnome
  29M    include
 107M    j2se
   1K    java
 326M    jdk
 2.1M    kernel
   4K    kvm
 809M    lib
 172M    local
   1K    mail
   1K    man
   5K    net
   1K    news
  32K    oasys
   1K    old
 475M    openwin
  58M    perl5
 9.0M    platform
   1K    preserve
  15K    proc
   1K    pub
  51M    sadm
  15M    sbin
 413M    sfw
 262M    share
 3.2M    snadm
   1K    spool
   1K    src
 571M    staroffice7
   1K    tmp
 736K    ucb
 159K    ucbinclude
 626K    ucblib
 415K    vmsys
 2.9M    xpg4
 498K    xpg6
#usr>

How should a tool know what can be discarded? If you can't tell it any tool, it won't clean up by sense. No clue if there is any tool for Unix/Linux that does this but how could it know.
So if you don't know what happened with this box, best would be a fresh install.