Easy way: Connect my repo: http://community.wd.com/t5/WD-My-Cloud/Repository-with-software-worked-on-v4-firmware/td-p/829720
Then, run:
apt-get remove --purge wd-nas
All WD software will be deleted. Include Web server (Apache2/php/mysql) and ssh server, so install it again:
apt-get install openssh-server transmission-daemon
Or you can try prepare clean image (Using debootstrap). All instructions in my Google.drive folder.
Also - you can delete all start scripts of WD’s services from /etc/init.d (Maybe need reinstall ssh server)