Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
Greetings everyone. I decided to reach out to this community because I have come up short taking the more conventional avenues. On my iPhone and as well as on my Mac, inside of ~/Library/Mobile Documents/ are dozens of old and stale directories from legitimate AppStore apps and iOS tweaks that I have installed over the years. 99% of these directories are from programs that I have long ceased using and are in no uncertain terms STALE.

6e4eb7c0affcb464449c8c0772c0b26c.png


I have repeatedly attempted to remove these directories in both macOS and iOS. I have tried removing them via both the mobile and root users to no avail. Well, they do go away.... For about one second, before they're repopulated by iCloud.

It appears many apps/tweaks/utilities write to this folder, perhaps straight to iCloud? Essentially, any device I am logged into has these same junk directories. Mind you, they are all empty directories and take up no space - the issue I have is that they exist for no reason than other to infuriate me!

If the app developers can code their apps to write these directories, I certainly should be able to remove them, permanently.

Apple customer service was of no help. The CSR stated he could indeed see the dozens of empty directories but that it was against policy for him to modify any data on users iCloud accounts. I practically begged him to erase this garbage but he wouldn't do it.

I just want it cleaned out.

Any developers mind helping me out here? I'm an expert level nix user and have worked for AMD, IBM, and Dell, performing Linux and AIX development. My mind is boggled here...

thanks gents

edit: the pic is a screenshot from my iPhone on 9.3.3. My iMac has the same exact directories. They are not visible via the iCloud app. Only in terminal.
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
Greetings everyone. I decided to reach out to this community because I have come up short taking the more conventional avenues. On my iPhone and as well as on my Mac, inside of ~/Library/Mobile Documents/ are dozens of old and stale directories from legitimate AppStore apps and iOS tweaks that I have installed over the years. 99% of these directories are from programs that I have long ceased using and are in no uncertain terms STALE.

6e4eb7c0affcb464449c8c0772c0b26c.png


I have repeatedly attempted to remove these directories in both macOS and iOS. I have tried removing them via both the mobile and root users to no avail. Well, they do go away.... For about one second, before they're repopulated by iCloud.

It appears many apps/tweaks/utilities write to this folder, perhaps straight to iCloud? Essentially, any device I am logged into has these same junk directories. Mind you, they are all empty directories and take up no space - the issue I have is that they exist for no reason than other to infuriate me!

If the app developers can code their apps to write these directories, I certainly should be able to remove them, permanently.

Apple customer service was of no help. The CSR stated he could indeed see the dozens of empty directories but that it was against policy for him to modify any data on users iCloud accounts. I practically begged him to erase this garbage but he wouldn't do it.

I just want it cleaned out.

Any developers mind helping me out here? I'm an expert level nix user and have worked for AMD, IBM, and Dell, performing Linux and AIX development. My mind is boggled here...

thanks gents

edit: the pic is a screenshot from my iPhone on 9.3.3. My iMac has the same exact directories. They are not visible via the iCloud app. Only in terminal.
So you delete these and when you connect to the cloud, they come back?
Is there some settings in iTunes that automatically update these?
Were these apps deleted from within iTunes as well as from the device?

I ask this because you said you can delete them, but they return, which makes me think there's some "restore" option in iTunes or on the device. Is this with all the apps that use iCloud or just some? If it's all apps that use iCloud, I'd look at the settings.

Another option would be to contact the developer of some of the apps and see if they have some insight. It's odd that if the app isn't on the device and/or not being run, that the directory would be there. That (if true) would suggest that it's some restore type setting in iClould/iTunes.
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
So you delete these and when you connect to the cloud, they come back?
Is there some settings in iTunes that automatically update these?
Were these apps deleted from within iTunes as well as from the device?

I ask this because you said you can delete them, but they return, which makes me think there's some "restore" option in iTunes or on the device. Is this with all the apps that use iCloud or just some? If it's all apps that use iCloud, I'd look at the settings.

Another option would be to contact the developer of some of the apps and see if they have some insight. It's odd that if the app isn't on the device and/or not being run, that the directory would be there. That (if true) would suggest that it's some restore type setting in iClould/iTunes.

Thanks for the response. 99% of these apps are not installed on any devices nor are they synced within iTunes. It is only some apps that do this and I believe them to be apps that would save settings/save states to the iCloud. I've searched high and low for any settings that would allow me to get rid of the directories, to no avail. Some apps do actually provide the option to disable saving to the iCloud via settings - general - iCloud storage, but the vast majority do not.

If I could figure out how the app developer had their app write to iCloud then perhaps one of them could create a utility that communicates with the iCloud to erase the directories.

After performing an 'rm -rf *' from within the Mobile Documents directly, the encompassed directories are indeed removed but only for a brief second until iCloud pushes them back in.

It basically amounts to what is a directory containing dozens of other directories that have no purpose other than to be an annoyance; the directories include stale remnants from Cydia apps & AppStore apps. I certainly don't want any of that there.

The directory is also mirrored on my iMac and any other machine that my iCloud account is logged into.

I've tried to remove them from all of my devices at once even, which was not effective. iCloud just pushes them right back.
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
Thanks for the response. 99% of these apps are not installed on any devices nor are they synced within iTunes. It is only some apps that do this and I believe them to be apps that would save settings/save states to the iCloud. I've searched high and low for any settings that would allow me to get rid of the directories, to no avail. Some apps do actually provide the option to disable saving to the iCloud via settings - general - iCloud storage, but the vast majority do not.

If I could figure out how the app developer had their app write to iCloud then perhaps one of them could create a utility that communicates with the iCloud to erase the directories.

After performing an 'rm -rf *' from within the Mobile Documents directly, the encompassed directories are indeed removed but only for a brief second until iCloud pushes them back in.

It basically amounts to what is a directory containing dozens of other directories that have no purpose other than to be an annoyance; the directories include stale remnants from Cydia apps & AppStore apps. I certainly don't want any of that there.

The directory is also mirrored on my iMac and any other machine that my iCloud account is logged into.

I've tried to remove them from all of my devices at once even, which was not effective. iCloud just pushes them right back.
Ok, I'm no expert on iCloud or it's settings, but what if you were to setup another account (if that can be done). Remove all the apps and start fresh with a new iCloud account. Then just dump (delete) the old account?

My limited understanding is that iCloud is just another drive, just another storage destination from the view of the developer. As far as writing an app that removes things from another app, I don't think a regular app would be able to do that as it would probably violate Apple's "sandbox" rules.

This really points to something in an iCloud setting. It might not be in your control or might be set when the account is 1st setup. If it's only there when you 1st setup the iCloud account, you'd probably have to setup a new account.

Does Apple allow you to have more than one iCloud account? What about reseting the device back to new (if that can be done)?
 

AxoNeuron

macrumors 65816
Apr 22, 2012
1,251
855
The Left Coast
There is some data that gets written to iCloud that you won't have much direct control over, at least nothing that Apple officially supports.

My main question would be, why do you care? I can't imagine these folders contain much more than some tiny config files, are they really taking up a whole bunch of space?
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
KarlJay and AxoNeuron, first and foremost thank you for taking the time to respond to my dilemma. I appreciate it.

Okay, @KarlJay, I would certainly be able to start with a new iCloud account by creating a new user, thereby losing all the apps and DLC that I have paid for. As for restoring the device, as soon as I enter my appleID credentials, it'll repopulate the module documents directory with all that garbage. I need a Cydia app that forgoes Apple's sandbox rules and wipes the iCloud Drive completely clean. It must be possible as app developers can write their own garbage to it. I'm not much of a coder so I'd have to rely on the jailbreak community. Apple wouldn't help, I suppose due to the liability of them deleting my stuff, even though that's exactly what I want them to do

@AxoNeuron, you're correct. I need a third party app with the proper code that communicates to icloud to wipe that drive.

...and I care because there is no need for that stuff in there and it's just clutter. It stems from Apple not pushin devs to not leave junk directories around. I should have control over what goes on my iCloud Drive. I don't want some game that I played once saving a directory on my cloud that I can't get rid of.

If Apple could transfer my purchases to a new account, id do it... but eventually I'd have the same problem. Dozens of stagnant old stale directories that only clutter my iCloud, even though I can only see them via terminal. It is just shoddy programming and I don't like it. :)
 

AxoNeuron

macrumors 65816
Apr 22, 2012
1,251
855
The Left Coast
KarlJay and AxoNeuron, first and foremost thank you for taking the time to respond to my dilemma. I appreciate it.

Okay, @KarlJay, I would certainly be able to start with a new iCloud account by creating a new user, thereby losing all the apps and DLC that I have paid for. As for restoring the device, as soon as I enter my appleID credentials, it'll repopulate the module documents directory with all that garbage. I need a Cydia app that forgoes Apple's sandbox rules and wipes the iCloud Drive completely clean. It must be possible as app developers can write their own garbage to it. I'm not much of a coder so I'd have to rely on the jailbreak community. Apple wouldn't help, I suppose due to the liability of them deleting my stuff, even though that's exactly what I want them to do

@AxoNeuron, you're correct. I need a third party app with the proper code that communicates to icloud to wipe that drive.

...and I care because there is no need for that stuff in there and it's just clutter. It stems from Apple not pushin devs to not leave junk directories around. I should have control over what goes on my iCloud Drive. I don't want some game that I played once saving a directory on my cloud that I can't get rid of.

If Apple could transfer my purchases to a new account, id do it... but eventually I'd have the same problem. Dozens of stagnant old stale directories that only clutter my iCloud, even though I can only see them via terminal. It is just shoddy programming and I don't like it. :)
You should really look up how little space those folders are taking up.

Trust me, this is not worth spending much time over. Modern devices have many billions of bytes to deal with. Some config file taking up a few bytes of space...it's just not a big deal.

I think you would probably have a stroke if you realized just HOW many unused files/folders there are in the OS portions of the drive.
 
Last edited:

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
You should really look up how little space those folders are taking up.

Trust me, this is not worth spending much time over. Modern devices have many billions of bytes to deal with. Some config file taking up a few bytes of space...it's just not a big deal.

I think you would probably have a stroke if you realized just HOW many unused files/folders there are in the OS portions of the drive.


LOL!

@AxoNeuron, they take up a few bytes if even that. The directories are all empty!

You're going to either laugh or shake your head... but I have traversed through nearly every directory on both my iPhone and iMac via root and manually removed hundreds upon hundreds of files and directories. Both OS X and iOS do a great job of keeping themselves clean. Some apps in OS X really leave crap all over the place. It infuriates me when app devs have such complex apps that must leave files all over outside of the sandbox (user account directory) and don't have an uninstall utility or have one that does a half ass job.

I would really like those directories gone from the ~/Library/Mobile Documents/ dir. I'm going to reach out to BigBoss or other Cydia app coders that might have some insight. Hell, maybe I'll figure out the coding and release my first Cydia app...
 

AxoNeuron

macrumors 65816
Apr 22, 2012
1,251
855
The Left Coast
LOL!

@AxoNeuron, they take up a few bytes if even that. The directories are all empty!

You're going to either laugh or shake your head... but I have traversed through nearly every directory on both my iPhone and iMac via root and manually removed hundreds upon hundreds of files and directories. Both OS X and iOS do a great job of keeping themselves clean. Some apps in OS X really leave crap all over the place. It infuriates me when app devs have such complex apps that must leave files all over outside of the sandbox (user account directory) and don't have an uninstall utility or have one that does a half ass job.

I would really like those directories gone from the ~/Library/Mobile Documents/ dir. I'm going to reach out to BigBoss or other Cydia app coders that might have some insight. Hell, maybe I'll figure out the coding and release my first Cydia app...
If they take up only a few bytes....why on earth are you wasting your time? Deleting a single photo off your device will save you many ORDERS of magnitude more space...
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
If they take up only a few bytes....why on earth are you wasting your time? Deleting a single photo off your device will save you many ORDERS of magnitude more space...


It's not about space. It's about uniformity and how it doesn't pass the smell test. It stinks of android level quality control. Installing an app and running said app (then deleting it) should not leave behind stagnant remnants that don't go away even after performing a full wipe of the device.

It's icky!
 

Mascots

macrumors 68000
Sep 5, 2009
1,665
1,415
It's not about space. It's about uniformity and how it doesn't pass the smell test. It stinks of android level quality control. Installing an app and running said app (then deleting it) should not leave behind stagnant remnants that don't go away even after performing a full wipe of the device.

It's icky!

IMO it's not clutter because it's not anything exposed to you. The only reason you know of this is because you snooped somewhere the average user shouldn't.

It's a meaningless pursuit. Apple forced you to deal with useless icons on your home screen until just recently - this is significantly less of an issue.
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
IMO it's not clutter because it's not anything exposed to you. The only reason you know of this is because you snooped somewhere the average user shouldn't.

It's a meaningless pursuit. Apple forced you to deal with useless icons on your home screen until just recently - this is significantly less of an issue.

While I can appreciate the fact that most users won't ever see the clutter because most users don't commonly use terminal and the awesome robustness that OS X has to offer in regards to its UNIX capabilities, I'm not one of those users. I don't use Pages (or Word), I use VI. I don't manage my file system via Finder or Spotlight, I use mv, cp, find, and the plethora of powerful tools within OS X thanks to its UNIX backbone. I am able to utilize my iCloud Drive to its full potential... and that's all I really want. I want to be able to manipulate the contents of my iCloud Drive, without being limited to what obviously poor programming (on the app developers part)!has done, which is littering my iCloud Drive with dozens of stale directories for programs and apps I haven't used in years.

I'm glad you can ignore it, but I want to -fix- it. I know it's possible, I just haven't figured out how.

but I will, oh yes, I will.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Apps don't get the chance to clean themselves up when being uninstalled. Normal app resources are stored in the app sandbox, which is deleted when an app is deleted. But iCloud is different. If iCloud resources remain intact when an app is deleted this is arguably an Apple bug and you should be able to file a bug report with Apple about it. I would recommend doing that. See the below page for more info. There is a chance that you'll get some feedback from someone at Apple that understands the issue and can either tell you how to fix it or tell you that it can't currently be fixed.

https://developer.apple.com/bug-reporting/
 

AxoNeuron

macrumors 65816
Apr 22, 2012
1,251
855
The Left Coast
While I can appreciate the fact that most users won't ever see the clutter because most users don't commonly use terminal and the awesome robustness that OS X has to offer in regards to its UNIX capabilities, I'm not one of those users. I don't use Pages (or Word), I use VI. I don't manage my file system via Finder or Spotlight, I use mv, cp, find, and the plethora of powerful tools within OS X thanks to its UNIX backbone. I am able to utilize my iCloud Drive to its full potential... and that's all I really want. I want to be able to manipulate the contents of my iCloud Drive, without being limited to what obviously poor programming (on the app developers part)!has done, which is littering my iCloud Drive with dozens of stale directories for programs and apps I haven't used in years.

I'm glad you can ignore it, but I want to -fix- it. I know it's possible, I just haven't figured out how.

but I will, oh yes, I will.
It's hilarious how you keep blaming developers for this, but there is literally NOTHING they can do. Apple does NOT give us the ability to remove these folders and files when the app is uninstalled. What, you think Apple calls some special routine when your app is about to get uninstalled so you can perform some OCD cleaning maneuvers....? No.

Dude, this is Apple's fault. Now go take your Steve Jobs koolaid somewhere else.
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
Apps don't get the chance to clean themselves up when being uninstalled. Normal app resources are stored in the app sandbox, which is deleted when an app is deleted. But iCloud is different. If iCloud resources remain intact when an app is deleted this is arguably an Apple bug and you should be able to file a bug report with Apple about it. I would recommend doing that. See the below page for more info. There is a chance that you'll get some feedback from someone at Apple that understands the issue and can either tell you how to fix it or tell you that it can't currently be fixed.

https://developer.apple.com/bug-reporting/

Thanks for the tip, ill give it a shot.
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
It's hilarious how you keep blaming developers for this, but there is literally NOTHING they can do. Apple does NOT give us the ability to remove these folders and files when the app is uninstalled. What, you think Apple calls some special routine when your app is about to get uninstalled so you can perform some OCD cleaning maneuvers....? No.

Dude, this is Apple's fault. Now go take your Steve Jobs koolaid somewhere else.

Excuse me? What compelled you to even participate in this topic if you're going to be an obtuse ********? You have offered absolutely nothing to the conversation other than rude remarks and snide comments. I'm sure you're a real treat around your coworkers.

Welcome to my ignore list.
 

mooninite

macrumors member
Original poster
Oct 7, 2013
60
33
So, with that behind us...

I understand that the app is not going to automagically uninstall its litter from the iCloud Drive during the uninstallation process. Even after reinstalling the app, it doesn't give me an option to remove said files/directories. Actually, some apps do. You can remove them via Preferences - iCloud on macOS. Those apps seem to be solely Apple apps, though.

This issue could definitely be construed as an apple bug but with certainty, no matter who is at fault, Apple could provide a solution.

When removing the files manually, it is made clear that the Mobile Documents folder is a mirror of the actual iCloud Drive as making certain modifications indeed do make changes on the actual iCloud Drive but others do not. I can copy and file into that folder via terminal and it becomes uploaded to the actual iCloud. I can remove the file and the changes are made to the actual iCloud.

What I'm not understanding is why can I not make the changes I want to. There are obsolete directories that serve me no purpose. I'm sure I'm not the only person that doesn't want these files (albeit hidden files) on their iCloud drive.

If the preferences panel on my Mac allows to make changes such as what I'm requesting to particular file applications. I need to figure out what is occurring in the background so I can apply it to meet my needs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.