The orphaned files in your directory could be ones that you have restored from a backup at some point. ones that have long since been deleted by the software, but then restored by a human back/restore outside of ubbt software's control and awareness. the files in the directory are the result of a database entry. not the other way around.
since you are manually accessing files and directory entries already, a simple fix is as follows:
1. go through your styles within the style editor and delete (using the trashcan on the right column) each one that you no longer want.
2. now open each style that you do want, and open it as if you were to edit it. then click "update or add style" button from within the editor. do this for each of those styles.
3. now go in to your /styles directory and delete all of the style files that do not have a recent date on them. the recent dated ones are the ones you've just had the UBBT recreate for you. every css file with an old date is unused by the current UBBT installation.
take care NOT to deleted admin.css, common.css, index.html, wrappers.php and the images directory.
those 3 steps will cleanup the styles directory for you.EDIT:
has become deprecated because it is not in the spec:https://www.w3.org/TR/html50/browsers.html#dom-location-reload
When attempting to perform step #1 in a modern browser, you may be affected by this depreciation. This affects all version of UBB.threads through to version 7.7.5. There is a simple fix for this depreciated code that you can perform now. It will also be updated and fixed in newer releases of UBB.threads.
The fix is as follows:FIND IN templates/default/admin/styles.tmpl
AROUND LINE 12
window.location.href = window.location.href;