How to Uninstall Bitcoin Core and Remove Data in Linux

Bitcoin Core is now fully compatible with many distributions of Linux, as well as a number of other Unix-based operating systems. Installing precompiled binaries shouldn’t be difficult for that reason, but it can consume quite a bit of space on whatever partition you have mounted to the / directory. You may want to remove it for this reason, or simply because you’ve moved to a different virtual currency. As long as you installed it via a standard Linux package manager, you should find un-installation quite simple.

If you merely want to prevent the Bitcoin Core from starting when you boot your machine, then you can simply disable the bitcoind service without uninstalling it. Doing this keeps you from having to reinstall the service later, and it’s a good option for those who need the core occasionally but don’t always want to use it. Even if you do completely purge the Bitcoin package, you can unpack the precompiled binary packages later.

Method 1: Disabling the bitcoind Service

While it’s easy enough to undo un-installation, you might want to give some thought to keeping the package and resident data on your partition for the time being. Just because something is installed doesn’t actually mean you have to use it. From the CLI prompt, you can issue the command sudo systemctl disable bitcoind to prevent the bitcoind service from starting. You’ll have to enter your administration password if you haven’t preformed a superuser-level command from your terminal lately.

If you have root-level access from your terminal, you can simply issue systemctl disable bitcoind without the use of the sudo prefix. In either case, you’ll probably not see much output, but the service will be disabled after your next system restart. This won’t tamper with your installation, and you could always start it manually from the command line using this function. It simply disables it from running when the system boots. Many users actually follow this procedure not because they want to get rid of the Bitcoin Core, but rather because having many processes start at boot time really hurts system performance.

Method 2: Removing Bitcoin Core Using the yum Package Manager

Users of Red Hat Enterprise Linux, Fedora and CentOS more than likely installed the Bitcoin Core with the RPM Package Manager, which means they can simply enter yum remove bitcoind from the CLI prompt if they have administrator access. If not, then preface the command with sudo or su to gain root access. Once again, you might be asked for your password when performing this action.

The yum package command might move any configuration files you might have had floating around in your home directory to .rpmsave files in the same. You’ll need to clean these out to completely remove the Bitcoin Core data, but rest assured that other programs wouldn’t interfere with them.

Method 3: Removing Bitcoin Core Using the apt-get Package Manager

Debian, Ubuntu and the numerous derivatives thereof allow users to install Bitcoin Core using the Advanced Packaging Tool, which works through the apt-get terminal command. Users who actually installed a discrete .deb file they downloaded from a repository won’t have to worry about removing a PPA, but everyone else should quickly run dpkg -l | grep bitcoin to see what sort of things are installed. Ubuntu-geared repositories have listings for Bitcoin packages, and it’s possible to download .deb files from these.

Likewise, it’s possible to compile these packages from source, but if you want to remove everything make sure you don’t have any trailing PPA references. Once you’re ready, run sudo apt-get remove bitcoind from the terminal to remove the program without deleting data. If you’re absolutely sure that you want to delete the software plus remove all of the related user data, then you can instead run sudo apt-get purge bitcoind while keeping in mind that there’s no going back once you answer yes to the [y/N] prompt apt-get will give to you.

Method 4: Removing Bitcoin User Data

Just in case the prior steps didn’t remove everything that you want to get rid of, you can remove your hidden .bitcoin directory to delete all of the wallets, addresses and pointers to any Bitcoins you might have. It also removed the blockchain history if you have any. Remember that there’s no going back on this either, so you’ll want to back up anything you’re afraid of loosing.

Depending on your setup, bitcoind might have created an additional user on your system, but more than likely it simply stashed the .bitcoin directory underneath your home directory. You can use rm -rf ~/.bitcoin from the terminal to delete this. If you’re having a rough time locating it, however, then you can try sudo updatedb followed by sudo locate .bitcoind to be sure of it’s location. The blocks that actually take up a large amount of space are generally found in ~/.bitcoind/blocks/, which is usually what people are trying to remove if they uninstall this software to make some space. Unfortunately, Bitcoin Core doesn’t really like portable installations, so you’ll have a rough go of it trying to move this data to a separate partition and then run it from there.

You could use the steps in Method 1 to disable it from running on startup and then move the hidden Bitcoin directories to an SD card or a USB memory stick. Whenever you want to run the software, you’ll need to move them back to your ~ directory, which can be something of a hassle, but this method does have the benefit of encouraging you to make regular backup copies of it. Any file system should work for this, but you may feel more secure using an external volume formatted to one of the various native Linux formats.

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Uninstall Bitcoin Core and Remove Data in Linux

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested