Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to sell an old Android phone. How can I delete sensitive data on my Android phone with a MicroSD card from within Ubuntu, in a secure manner?

share|improve this question
up vote 5 down vote accepted

You can erase SD card using a command line tool called shred (manpage)

You can also refer to this discussion in askubuntu. How to delete file(s) in secure manner?


Here is a tutorial (but you don't need live cd, if you are on ubuntu) -

For deleting everything on phone, Hard reset is OK. But I recommend flashing the original phone firmware. You can get instructions at XDA

share|improve this answer
Is it established that any existing methods of overwriting data are sufficient to prevent any possible data recovery on flash media? Almost all the research in this areas applies specifically to magnetic hard disks. – Eliah Kagan Mar 26 '13 at 12:37
I have reinstalled CyanogenMod on that phone. So that is really enough to delete all the data on the phone in a secure manner? – BuZZ-dEE Mar 27 '13 at 10:47

You can try in terminal:

 shred –remove –iterations=<num> <file>

e.g. : cd your memorycard name ls (to list the files) shred -remove -iteration=50 yoursensitivedatafile name

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.