TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Cleaning up my 200GB iCloud with some JavaScript

338 点作者 amin超过 1 年前

43 条评论

asdaq1312512超过 1 年前
Photos.app doesn&#x27;t show file size… so I thought, why not build a little Photos.app extension or a separate app that queries for large files?<p>Turns out that the API doesn&#x27;t expose &quot;file size&quot;, at least I didn&#x27;t find a straight-forward way.<p>I <i>think</i> that all &quot;photos&quot; or &quot;videos&quot; are just a <i>view</i> of the underlying &quot;photo or video object&quot;. If you crop a video, the full-size video will remain. Only if you export the video, it will be cropped and the smaller file size will manifest.<p>I guess that&#x27;s why the file sizes differ.<p>[Edit: someone created an AppleScript to query file sizes - I didn&#x27;t test it, yet: <a href="https:&#x2F;&#x2F;discussions.apple.com&#x2F;docs&#x2F;DOC-250000422" rel="nofollow">https:&#x2F;&#x2F;discussions.apple.com&#x2F;docs&#x2F;DOC-250000422</a> ]
评论 #38882867 未加载
评论 #38886322 未加载
评论 #38884003 未加载
评论 #38880185 未加载
评论 #38936411 未加载
评论 #38885548 未加载
评论 #38880163 未加载
mft_超过 1 年前
Okay, so it could be a bug, but it is possible that iCloud is secretly storing more than one version of the file in some cases? (After all, Apple does similar things with other media files.)<p>The example given at the end is interesting:<p>&gt; So iCloud says the video is 128MB, I download it and the video is actually 48MB, and my free storage increases by ~170MB when I deleted it. Interesting!<p>This suggests that iCloud isn&#x27;t simply misrepresenting the size of the example file, as then you&#x27;d expect that deleting the 128MB file would clear ~128MB of iCloud space. Instead, the deletion clears <i>roughly</i> the space it reports (128MB) <i>plus</i> the space of the downloaded version (48MB): 128MB + 48MB = 176 MB - which might be close enough, allowing for rounding errors, as iCloud reports the free space (from the article&#x27;s example) to the nearest 10 MB.
评论 #38878734 未加载
评论 #38878297 未加载
评论 #38878391 未加载
评论 #38878273 未加载
seffignoz超过 1 年前
Thanks for the idea&#x2F;solution!<p>I converted this into a TamperMonkey&#x2F;Greasemonkey script. Also added a feature to &quot;hide&quot; all elements that do not match the threshold.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;seffignoz&#x2F;icloudcleanup">https:&#x2F;&#x2F;github.com&#x2F;seffignoz&#x2F;icloudcleanup</a>
sandreas超过 1 年前
That&#x27;s one of the reasons I self-host. I just don&#x27;t trust the cloud providers regarding clarity and transparency... even if my self-hosted solution was far less reliable, less secure and less performant (I imagine it&#x27;s not ;), I probably wouldn&#x27;t change.<p>I personally use immich[1], a very complete solution with iOS &#x2F; Android App, Server-Component and Sync &#x2F; Backup option.<p>[1]: <a href="https:&#x2F;&#x2F;immich.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;immich.app&#x2F;</a>
评论 #38882581 未加载
评论 #38878493 未加载
InsomniacL超过 1 年前
I&#x27;m pretty sure that iCloud stores the full version and downloads a lower quality optimised version to your phone.<p>If you open iPhone settings and browse to:<p><pre><code> &gt; Apple ID &gt; iCloud &gt; Photos </code></pre> There is an option to &#x27;Optimise iPhone Storage&#x27; which is enabled by default. This states:<p><pre><code> &gt; If your phone is low on space, full resolution photos and videos are automatically replaced with smaller device sized versions. Full-Resolution versions can be downloaded from iCloud at any time. </code></pre> This seems perfectly reasonable to me.
评论 #38878280 未加载
评论 #38889328 未加载
评论 #38897126 未加载
cianmm超过 1 年前
Interesting article. I have my own problem, that caused me to have to upgrade my iCloud plan, and thus may not be a high priority fix for Apple.<p>If you shoot RAW+JPEG (not a super-rare thing to do, for photo enthusiasts) then Apple Photos links the two images. Which is useful, rather than having a bunch of kinda-duplicates littering your library you can easily toggle between RAW and JPEG.<p>But this combining, along with the file system design described in this article, makes it impossible (as far as I can tell, anyway) to easily separate them and delete the RAWs. So years later, I have HUGE RAW files that I&#x27;ll never touch that I can&#x27;t delete, because I want to keep the much smaller JPEGS.<p>Any method that I&#x27;ve found to clean them up (exporting the originals, deleting them from the library, and then re-importing the JPEGs only seems easiest) will lose all of the years of metadata that I&#x27;ve built up in the library.<p>So I have to upgrade.
评论 #38877811 未加载
评论 #38936510 未加载
评论 #38880008 未加载
评论 #38881820 未加载
cnicolaou超过 1 年前
Surprisingly, I&#x27;ve received a similar storage notice from Apple before the holidays and I decided to download all photos&#x2F;videos into my own media server instead of hosting it on iCloud. There is not an easy, straight-forward way to download your archive from iCloud. I am slowly getting there using multiple machines and devices.<p>The issue with the recent changes with Apple is that they increase the prices for no good reason. We&#x27;re always going to take photos&#x2F;videos and their sizes keep increasing with modern tech and capabilities.
评论 #38878368 未加载
评论 #38878720 未加载
评论 #38880960 未加载
评论 #38878168 未加载
captn3m0超过 1 年前
The thing I detest the most is the weird tier that jumps from 200GB to 2TB. There’s no way to pay for incremental storage for 500GB or 1TB, which would be perfect for many families.<p>In today’s age where storage is a commodity, this ought to be priced per GB used.
评论 #38880384 未加载
评论 #38878286 未加载
mmikeff超过 1 年前
The thing that is taking up loads of my iCloud storage is the &#x27;live&#x27; video version of photos where the tiny snippet of movement has a larger filesize than the photo that it accompanies. The only way I have found so far to deal with this is to download the files locally, delete from iCloud, delete the local videos and upload the remaining still images. This is time consuming, clunky and makes me nervous that I&#x27;ll delete something or lose something important in the process. Is there anything out the that help to automate that process but where there is some level of editorial control so that I can identify and keep the handful of &#x27;live&#x27; images that I might actually want to keep?
atlas_hugged超过 1 年前
Am I reading this right?<p>If this is widespread, this could be seen as apple bloating figures to push people to upgrade, which could lead to a lawsuit, no?<p>IANAL
评论 #38878427 未加载
评论 #38877854 未加载
评论 #38877875 未加载
kossTKR超过 1 年前
Tangent but does anyone else find iCloud sync random &#x2F; slow?<p>The smart thing about having both an iPhone and a Macbook should potentially be; snap a bunch of photos, instantly have them available on the computer - but no. Apple apparently chooses a random time depending on 100 factors to upload the photos in the next 30 minutes to 7 days.<p>So you often have to airdrop a bunch of photos files completely invalidating the purpose of the sync function.
orenlindsey超过 1 年前
Interesting, also, Apple should make a mid-tier of iCloud. If they had a 500gb (or 400 or whatever) they could have gotten this guy to pay more.
评论 #38886731 未加载
Alifatisk超过 1 年前
I&#x27;ve tried iCloud, Onedrive, Google Photos. Out of all these three, I stuck with Google Photos on my Iphone.<p>iClouds bad pricing and storage issues led me to switch to Google Photos, It&#x27;s way better. The lack of native support on iOS can be a little cumbersome though.<p>The only thing I wish these cloud providers offered was a way to deduplicate photos &#x2F; videos. That would make my life so much easier.
评论 #38878577 未加载
评论 #38878797 未加载
alephnan超过 1 年前
Don’t you remember how painful it was to import&#x2F;export an mp3 file into an IPod?<p>It was especially painful on a Windows PC.<p>The biggest selling point of other mp3 players for me was the ability to transparently copy and paste files into the filesystem.
baxtr超过 1 年前
Slightly off topic: anyone know how to backup iCloud data (mainly photos and videos, but also notes) to an outside platform?<p>I’m an Apple fan, but still don’t like the idea of having all my digital life on iCloud only.
评论 #38882536 未加载
评论 #38882341 未加载
评论 #38882369 未加载
sccxy超过 1 年前
iCloud backup is real mess.<p>Free 5GB is not enough for backing up iPhone system data any more.<p>Most insane is that if you remove some apps from backup, then it iCloud usage goes from 4.5GB to 4.6GB.
评论 #38889335 未加载
sliq超过 1 年前
Can confirm, have some ideas: Apple uses different file formats &quot;internally&quot; and also different resolutions, maybe saving them all in parallel as &quot;one&quot; video, which might cause this issue. So the total space per image is actually the sum of original .mov, optimized .mp4 and thumbnail image.<p>Also, (automated) version history might have caused this! Maybe (automatic) image optimiztion saved old and new versions of everything.
spockz超过 1 年前
I’ve been on a similar hunt. My devices are littered with copies of videos that were shared via iMessage, WhatsApp, and other means. Each of these apps then store the copy locally which then gets backed up in iCloud.<p>Unfortunately I haven’t found a way to automatically delete all the videos&#x2F;photos that I send which still have the original in the photo stream. It would be awesome to be able to automate that.
评论 #38884985 未加载
Havoc超过 1 年前
Good timing..I&#x27;ve been getting the same warning mails (though 50gb). Was planning to go through photos but checking vids first makes sense
评论 #38878473 未加载
sroussey超过 1 年前
I need a good way to cleanup a gmail account…
LUmBULtERA超过 1 年前
That&#x27;s an interesting bug&#x2F;problem(?) he ran into.. Though, on the topic of reducing storage usage, in the Photos iOS app, you can remove photo duplicates under &quot;Albums&quot; at the very bottom -- if you have duplicates that it recognizes, there will be a line item for this, otherwise the line item will disappear.
shreezus超过 1 年前
On this topic...anyone know the best way to export an entire iCloud Photo Library at full resolution?
评论 #38886088 未加载
评论 #38886102 未加载
aledalgrande超过 1 年前
In terms of iCloud cleanup, has anyone found a way to clean up iMessage attachments &gt; x years old, greater than n MB or from certain contacts? It would clean up so much space for me. Apple only clears &gt; 1 year old from the settings.
tamimio超过 1 年前
&gt; Videos anonymized by slow internet loading<p>I chuckled!<p>I believe the size difference has to do with the encoding, can’t tell for a fact since you didn’t show that part, but maybe it gets re-encoded when you download it hence the difference.
sneak超过 1 年前
Apple interested in maximizing recurring subscription revenue?<p>You don’t say. I’m sure this is just a harmless bug and not the source of $20M extra revenue per year across their hundreds of millions of active iCloud users.
Havoc超过 1 年前
Just discovered you can see file sizes for some items under &gt; icloud &gt; recommended for you<p>Finds duplicates, screenshots and big vids. Had a random vid that was 1.8gb for reasons unknown<p>Doesn&#x27;t always seem to be a accessible though
tugberkk超过 1 年前
Apart from the iCloud fiasco, I very much like these kind of programming. We generally lost the fun of it try to make enterprise&#x2F;corporate programs, we forgot to use them for personal tasks.
SirMaster超过 1 年前
Can&#x27;t you just use the Apple Shortcuts app to do a lot of this?<p>Pretty sure that can enumerate and query things like the filesize of the photos and videos in your iCloud.
wouldbecouldbe超过 1 年前
It would make sense if they save the video in a few formats for being able to load them fast in the Apple apps, most video hosts do the same.
评论 #38878209 未加载
BigBalli超过 1 年前
Was the video with size mismatch edited? Apple keeps both versions (same goes for photos, they include image and MOV for live photos).
znpy超过 1 年前
I&#x27;m being sarcastic here, but the solution could be quite simple: iCloud is billing you (both in terms of storage size and money) for both your data and the redundant copies.<p>Other companies would build the redundancy costs into the final pricing, but Apple is known to &quot;think different&quot;.
very_good_man超过 1 年前
Apple needs to face criminal penalties for the dark patterns with which they prey upon their users.
tamiral超过 1 年前
there is something weird happening on iCloud, my phone storage is off even though the total size of data isnt as big as it says, i throw a lot of .zip&#x2F;rar files on icloud and it seems like the data on icloud is more than it is on my HDD....
NDizzle超过 1 年前
With the iCloud desktop app for windows I&#x27;m able to sort by size...
FaridIO超过 1 年前
Additionally, if you take a 4MB photo and add it to a shared album with 5 people, those 5 people all have to use up 4MB from their storage. Instead of reusing the same image and having pointers to it, it looks like it&#x27;s &quot;copied&quot;.
评论 #38879423 未加载
评论 #38879679 未加载
godzillabrennus超过 1 年前
It seems like a giant class action lawsuit with a juicy target if Apple is overbilling customers on usage for videos in iCloud. I know lots of people paying for more storage in iCloud would appreciate the reprieve of lower costs.
lovegrenoble超过 1 年前
It&#x27;s better to self-host
raz32dust超过 1 年前
I am so tired of these patterns. Google Photos also does not allow any easy or good way to clean up junk. Why would they? They want you to run out of space so you can pay for their cloud storage. They also have low incentive to keep photo&#x2F;video storage space-efficient for the same reason.
dthakur超过 1 年前
Compression?
评论 #38878055 未加载
评论 #38878106 未加载
867-5309超过 1 年前
some possible reasons to investigate:<p>1. older videos have a larger file size because they are encoded less efficiently (h264 vs h265)<p>2. gigabytes vs gibibytes (like how a 500GB drive formats to ~465 GiB)<p>3. rounding errors<p>4. Apple fucking its customers<p>5. combo of the above
saagarjha超过 1 年前
I kind of hate opaque cloud solutions like this, because their storage usage is inscrutable and their interfaces are basically never optimized to help you clear things out. Whether that’s intentional and malicious or just not a priority, I don’t really care, I just want to be in control of the stuff I’m using.<p>I have a very similar issue with iMessage in iCloud, and unlike photos, there’s no web interface. You have to interact with it on your device. Thankfully I have a Mac so I can load up the chat database from there and see what’s using the space, but cleaning it up has been a nightmare: I have a script to find the big attachments, but if I delete them then some agent that manages the database goes into a loop for like five minutes <i>per deletion</i>. Then the change gets synced to iCloud (at least, I assume). So unless I fully reverse what the deletion process does and whether it is possible to do a batch operation I’m basically at the mercy of the front end they provide to clean things up, which as I mentioned earlier is absolutely not designed to make it easy to do this.
评论 #38877889 未加载
评论 #38878247 未加载
评论 #38879236 未加载
评论 #38880565 未加载
评论 #38880508 未加载
评论 #38882466 未加载
评论 #38880638 未加载
landswipe超过 1 年前
It&#x27;s called a bug &#x27;turning a blind eye&#x27;.. ie. a scam.
crossroadsguy超过 1 年前
There’s will be a time when there will be many open (or relatively more open) devices like FairPhone et cetera; and OSes that do not track users and suffocate you with dark patterns and hostility all around - like Graphene and Lineage; and hopefully they’d all be able to join their hands together and not reimplement the wheels of N types for the 1000th time all incompatible with each other. Hope is that there will be services and softwares on top of that spec and API of these OSes that will be the user’s choice to pick - for contact, for calendar, SMS, IM, call , media, sync, backup, device account management etc.<p>And such devices will be widely available, also in non-first world countries, with proper OEM warranties and support. Hell, a local manufacturer can just build for that spec.<p>I know it’s like a wishful dream. But if this happens, and when this happens, I hope a lot of us will be able to breathe free and hopefully would be candidly able to shit upon legacies of those so called fucking visionaries, who were barely not subhuman and were just rather pathetic jerks, who ensured such shit-show of walled gardens and opaquely implemented utterly inferior systems where users go and get stuck in one of the two houses of the duopoly to experience a lot of shitty things including, but not limited to, some variation of Stockholm syndrome and clear and conscious apologism.<p>Why? Because neither of the two is acceptably good and they have become so big and they have closed it down so much that nobody else can even make a dent even if they try. And they try!<p>So yeah, until then I will rant and feel shitty about both my iPhone 14 (as they call it - my “daily driver”) and Pixel 5a (my bread and butter phone; form factor wise less shitty one though).