How to fill storage space on an iPhone or iPad with little effort

Before I sell-on my old gadgets, I always try to do a factory reset and erase all data. I want to make it as difficult as I can for future owners to recover my personal data.

As an additional step, I like to fill the device’s storage with data in an attempt to overwrite any previously deleted data. Call me paranoid 🙂

One way of doing this could be to install some big apps after wiping the device, but this may then involve entering your credentials to access the relevant app store. I don’t like the idea of entering personal data when I’m trying to delete personal data!

Here’s a simple solution you may find helpful:

  1. Using a laptop (or PC), create a file that’s big enough to fill the mobile device
  2. Create a HTTP server on the laptop to serve up the big file to the mobile device
  3. From the mobile device, browse to the IP address of the laptop, and download the large file.

That may look complicated, but really it takes seconds to set up!

Here’s the detail:

  1. Take a look at the available disk space on your mobile device. Let’s say there is 22GB free. A new 22GB file (‘bigfile’) can be created in a split second in Linux without taking up any disk space (yes – you read that correctly!) by creating a sparse file as follows:
    truncate -s 22G bigfile
    It is recommended that you store the new file in a directory by itself. You’ll be sharing this directory over the network in a moment – you may not want to share your entire home folder!
  2. At the command prompt/terminal, make sure you’re in the directory containing the ‘large’ file above, and enter the following command to start the HTTP server:
    python3 -m http.server
    You will, of course, need Python 3 installed for that command to work.
  3. If the IP address of the laptop is 192.168.0.2, go the browser on your mobile device and browse to http://192.168.0.2:8000 where you should see something like the following:
  1. Click on ‘bigfile’ to start the download. There’s no getting away from the fact that a 22GB download will not be lightning fast (at the time of writing)!

This entry was posted in Linux, Privacy, Security and tagged , , , , , , . Bookmark the permalink.

Leave a comment