Clean up self service icon files from JSS

powellbc
Contributor II

Is there any good way to do this? I have some icons that were replaced with higher quality ones and I would like to remove the older ones, but there is no interface I know of in the JSS.

I realize I can go into the icons table if needed but would prefer not to.

7 REPLIES 7

mm2270
Legendary Contributor III

Yeah, I think the only way is to go into the MYSQL db from command line and remove them, or possibly just truncate the whole table that holds those icons and re-upload all the higher quality ones. It sucks that there's no way to manage this. Seems like an oversight that something like that wasn't included from the start, but I hope to see it in a future version. I'm pretty certain there's at least one FR out there already to get an interface built for that.

-Alerav-
New Contributor

if anyone can post "how to" would be great. I am in the same boat

powellbc
Contributor II

I wish I could help. Manually removing the entries from the database did not appear to help. I can still see and select them despite deleting them from the icons table.

were_wulff
Valued Contributor II

@powellbc @fvarela @mm2270

Well, I wish I had an easy one command that would do this, however, data from the icons table touches a few other tables as well, so there isn’t (yet) a super simple way to get rid of old icons.

For example, in 9.x, the icon_attachment_id column is found in the following tables:

ibooks
mobile_device_apps
mobile_device_configuration_profiles
os_x_configuration_profiles
self_service_plugins

The icon_id column appears in the following tables:

icons
vpp_mobile_device_app_license_app

The icons table itself has the following columns:

icon_id
filename
contents

So, there are potentially a lot of places it would need to be removed from and if anything else also happened to be using that same icon ID it would show up as broken after being removed.
Not quite as simple as just truncating the icons table or deleting specific icons from the icons table.

I did a little bit of searching and found this related thread, in which use of SQL Pro is mentioned as a way to more easily remove unnecessary, old icons:

Delete icons used for Self Service?

These are the two feature requests I found:

Don't duplicate icon files in database on policy duplication

and

Manage Self Service/Policy Icons

Wouldn’t be a bad idea to vote those up (first one is under review, second one could stand to have a few bumps), as development does pay attention to feature requests.

Thanks!
Amanda Wulff
JAMF Software Support

Jost
New Contributor II

+1

Hozein
New Contributor

Still need to have this feature in 2022

duncan_wright
New Contributor II

2023 checking in. Amazing this is still an issue.