iOS Safari has a weight problem #

The auspiciously-titled Safari hogging up storage on your iPhone? Here's the fix! exhorts users to tap Settings → Safari → Advanced → Website Data → Remove All Website Data (mgmiller68 wonders in the comments how this differs from Settings → Safari → Clear History and Website Data); alas, neither method proved efficacious.

Others advise waiting days for the issue to clear; sadly, not even weeks availed.

Still others recommend a draconian backup, wipe, and restore approach.

Macworld's Documents & Data: A mysterious black hole of data storage in iOS concludes unpropitiously:

"At a minimum, I’d like to know what’s taking up all that space. Those 7GB of Documents & Data probably include something that’s gotten stuck, that can’t be deleted, such as an old iOS update perhaps. But it would be helpful if every app had to offer a feature to delete its caches, or if there were a global Clear Caches feature in iOS."

Found the offending files by jailbreaking and SSHing into the device then:

# cd /var/mobile/Containers/Data/Application/

# find . -name Safari
./{GUID}/Library/Safari

# cd {GUID}

# du -h
...
4.0G    ./tmp/Download-tCA2Caas
...
3.7G    ./tmp/Download-UT0Nlzkj
...
7.8G    ./tmp
8.0G    .

Emptying the tmp directory did the trick:

Before After
iPhone 28.5 of 32GB used iPhone 19.9 of 32GB used
Safari 8.5 GB Safari no longer showing

H/T jareehD for the filepath hint.

/misc | Sep 26, 2020


Subscribe or visit the archives.