Is there an easy way to empty out an install of a standalone Geoserver jar (i.e., delete all the examples) or do I have to do it through either the admin GUI or the RESTful interface? Can I just delete or munge some files in the work directory? Or is there a command line switch to tell it to never unpack the examples in the first place?
download the war file and deploy it, then login and make all customizations (remove layers, adjust defaults, etc) until it suits you.
Now shutdown the servlet container, zip the geoserver directory and rename the resulting geoserver.zip as .war and you're done. A .war file in fact is just a .zip file in disguise.
IMPORTANT: when zipping the geoserver directory do it from inside the directory itself, not from the parent (which would be webapps if using tomcat). To check that you have done everything all right open the zip file: it should not have a lonely geoserver directory in the root folder.
it works pretty much as above since the standalone installer is just an archive of geoserver deployed in a self-contained servlet container: unzip, start, customize, shutdown and zip again.
UPDATED AFTER USER COMMENT
Geoserver stores all its configuration in xml files in the data_dir directory. For the meaning of each folder and/or xml file see the official documentation.
After reading teh docs it seems clear that removing everything under the following directories will get you an empty geoserver:
Bootnote: The directions given at top still hold true, the above is just another way of clearing layer configuration data. I recommend that the the user also sets other important params like username/passwords, security and memory settings, logging, etc before going into production.
For what you want, I think it's best to build your own wars. According to this thread, a war with an empty data directory is the default behavior if you check out the sources and build it.
Here are some guides to get you started on building your own war.
I actually found a way that, at least in chef, is a little easier than any of the above. Rather than repackaging Geoserver to remove the examples or removing them after Geoserver unpacks them, you can create a minimal data directory with only the required files in it, and Geoserver will assume it's already unpacked the data directory.
The minimal data directory contains all the subdirectories in the documentation and the top level files. There may be less required, but I discovered this solution worked.