God is telling us to understand the heart to purify our minds. Digging up the root is a process of understanding the fate which our own heart brings upon. When we ponder each fate, and ponder our minds and not act on our evil thoughts, we can gradually purify our minds. This is what digging the root means. It is a difficult process, but will bring upon the purification of our minds, and eventually only joy will come from our hearts.