Too many attachments?

I recently inherited support of a very large legacy Confluence system with a lot of attachments (approx 2.1 Tb). As part of an effort to get a handle on the attachments I surveyed the folder with du -sch {root}/attachments/ver003/*/*/* | grep -v nonspaced | grep -v ^0 | wc and discovered there are around 257 spaces represented in the folder tree. But when I query the spaces using the REST API (or the admin screen), there are only 57.

So, am I missing something here, or is it possible that 200+ spaces are simply orphaned? If the latter, should I try to find their rightful parents, or just delete them?

PS: I also have 650Gb of attachments in “nonspaced”, It seems that this is quite a bit, given the documentation about what nonspaced should contain.

@robertegan305 administrative issue like this are probably better on Atlassian Community.

Unfortunately, there is no out-of-the-box feature to manage such orphaned attachments. We do have a feature request for it this requirement: CONFSERVER-16577 - Ability to detect unused attachments

Fortunately, this problem can be solve with Apps from the Marketplace:

Hope that helps.