Search & Destroy

545

What to do when your MacBook storage is full and can’t handle storing a Zcash full node anymore ¯\_(ツ)_/¯

Disclaimer: Deleting files from the command line is not for the faint of heart. Before taking action, know and understand all risks, tradeoffs, and downsides of what you’re doing. Remember to back up everything important, know your private keys and seed words, and move any funds to safety before doing anything like this. This post is an account of my experience, not advice of any kind. I’m sure computer security experts will cringe at what I did here. Please act at your own risk. Burn after reading. Oh wait, digital records don’t degrade. That’s why we encrypt private stuff. I digress…

In 2017 I learned about Zcash. I was enchanted. I downloaded and ran a full node on an entry-level MacBook, which had more than enough memory at the time. I was on top of the world.

Fast forward almost 3 years. I wake up one morning, open up my ZecWallet full node to do the daily sync, and it stops syncing. Ut oh. I try my ZecWallet Lite. Same thing. It shows no connection and throws up some unintelligible error message. Then I check my Mac’s storage. Basically full. I know the truth deep in my heart. The day had come. It was time to say goodbye to the full node and put it down.

Where to start? I searched the internet to see if anyone else had removed a full blockchain from their hard drive. Almost nothing. There was enough however to know broad strokes:

  • limit the damage by sending my ZEC elsewhere
  • search my system’s storage in the terminal command line
  • locate where the blockchain data was being held
  • destroy it, without touching anything essential, and without crashing the whole computer
  • get back on the Z-train

This sounds like it has the difficulty of Liam Neeson taking on an army of bad guys, killing them one by one, and then capturing his kidnapped daughter. But really, I’m just a noob staring unknowingly at a computer trying to figure out how to make everything work again. And I made it work. Liam Neeson made it work. You can too.

  1. Limit damage. I moved all my funds to cold storage (ie. a Trezor or Ledger). This way no matter how bad I screwed up, at least I wouldn’t lose any ZEC. For me, this meant temporary deleting a few apps to free up enough space to send everything away and make a zero-balance.
  2. Search. A MacBook allows an average user to install and delete many things like apps, documents, iTunes songs, but important stuff like system files are untouchable in the user interface. It makes sense I suppose. But it means venturing into the terminal command line. On a Mac, click the search icon in the upper right hand corner, type “terminal” and hit enter. Now, I’m in the terminal. And it’s waiting for my commands. I feel oddly empowered.
  3. Locate. Next, I had to find the right file. After reading https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html I knew I was looking for a file called zcash.conf. I trial and error searched by diving into different directories. Needle in a haystack. Then I learned I could type sudo locate zcash.conf. There we go. It’s in Library/Application Support/Zcash/Zcash.conf. Application Support was the directory I would not have guessed.
  4. Destroy. I stepped toward my target by typing cd library and then cd “application support” From there I saw the Zcash directory, shining bright like a beacon on a hill. The command rm -rf Zcash removes it. Forever. It had to be done. I cleaned up a few other unrelated files and checked the system storage. ~50 GB lighter. My MacBook is usable again.
  5. Get back on the Z-train. The genius developer at ZecWallet made a lite version called ZecWallet Lite that take almost no storage space. ZecWallet Lite is a fully featured shielded wallet for Zcash that syncs in under a minute without requiring a full blockchain download. There are some tradeoffs, but it’s exactly what I need. You can download a fresh one, or I was already using ZecWallet Lite previously, so it was just a matter of downloading it again and restoring from seed words.

Hope this helps anyone who runs into computer storage issues, or maybe anyone who just wishes to tread lighter while still having fun with shielded z-addresses.

_eric

Donations to the author:
zs1rgpsptcay8mxxz5ypx94qsekgeqq77xfcw7xf36c9uhj5y3z90akdxh5lu7ldg7zlru5qzzrz70