Forum
Clearing unused assets
I'm going to embarrass myself here, I'm sure, but how do I clear unused assets from a server? When a user deletes from a website via the CMS they don't get cleared from the server (or do they…?) so the server fills up.
Is there an easy way to clear the unused assets? Or if there isn't what would you recommend I do to clear unused assets from the server? Is there a database table I can sift through to see what's active and manually delete the assets that aren't referenced? Or is there a more efficient way?
Thanks :)
They get deleted once they've fallen out of the undo history.
Disk space is super cheap though. If you're hitting against limits, it'd be a good idea to increase the space.
Ah, do they get deleted from the server too? I thought it was just from the CMS. That's good :)
Yeah, the client's a primary school so they have some pretty tight restrictions on hosting and the hosting company is a bit old school in their allowances and prices :(
Yes, they get deleted from the server. It can take a while - I think the default history stack is set at 8.
Great stuff :) Thanks!
Looks like when the content is deleted from a region or item the asset is sticking around in the Assets pane. Is there any way to get rid of the asset from there? An option to have it clear from Assets automatically would be cool, but I'm guessing it's a manual process. I can do it as I'm the primary admin but my client can't as only the primary admin can delete assets, can't they? Or am I off on one of my misunderstandings again…? :D
As mentioned, it'll stay until it falls out of the undo history.
Ah of course. Unused assets drop off unless they're marked as Library Assets. Gotcha.
So it looks like my assets are clearing ok. But the item in the Assets is still there, just with a broken image reference. Here's a screenshot: https://www.dropbox.com/s/6l0fr6edybcc480/Screen%20Shot%202016-12-01%20at%2011.43.02%20am.png?dl=0
Should these clear too, or should I jump in and delete them manually?
No, that should all go at the same time.
Oh… Here are the diagnostics – let me know if the extended report is more useful.
What's the state of it currently? What point are you trying to get to?
The Assets section of the website is full of those asset items with broken image references since the images have been removed but not the reference to them. So I'd like to have the assets clear completely – from the disk and from Perch, leaving the assets section nice and tidy. I'd prefer not to have to do it manually as there are hundreds :D
Did they all go at once? Are the files missing from disk? What happened?
My client got a message from their hosting provider that they were reaching 'full' on disk space so I presented them with some options. They chose to remove old galleries to clear up space rather than upgrade the hosting. So they went through and removed loads of old albums from their site through the Gallery app.
The files have been cleared from the disk ok but the item in the Assets section of the CMS is still there. So I'm seeing the item in Assets with the browser's broken image symbol, as the asset itself isn't on the server anymore: https://www.dropbox.com/s/6l0fr6edybcc480/Screen%20Shot%202016-12-01%20at%2011.43.02%20am.png?dl=0
They deleted them from the Gallery app, but they were still showing in Assets?
That sounds like a weird edge case with the bolting on of the Assets stuff into the old Gallery app.
That's right – the were deleted from the Gallery app and didn't clear from the Assets, even though the image files were removed ok. Is this something I should wait for a patch for or should I start clearing the empty asset items from Perch manually?
Start clearing them manually. The Gallery app is more likely to be deprecated than patched.
Right you are – I guessed as much as I can do everything the Gallery app does with Perch core these days. It struck me a while back that Events is in the same boat. ♥︎Perch♥︎ :D