Unlike the following example, this code will delete Safari’s history by using the Finder. From the AppleScript Users List.
OS version: OS X
set f to "" & (path to "cusr") & "library:safari:history.plist"
tell app "Finder" to if exists file f then move file f to the trash
tell app "Safari" to quit
do shell script "open -a safari"