Delete an .APP

Im guessing its because an .app file is a bundle/directory, but I can’t seem to use
folderitem.delete
or folderitem.moveto

to have my new app delete the demo version of same on first run.

Is there a one-liner that will achieve this, as opposed to trying to to a recursive deletion of the contents?

there is a FAQ entry for deleting folder:

https://www.monkeybreadsoftware.net/faq-howtodeleteafolder.shtml

That does the trick, Thanks Christian.