Took me forever to find this, but hopefully you found this post faster:
You can either use “context.clearRect(0, 0, canvas.width, canvas.height);” Which I found only worked sometimes, and best in desktop version of the browser.
What I did was the width trick (setting the canvas width to itself clears EVERYTHING), and since I had also drawn lines I had to run the beginPath() method like this:
context.fillStyle = "#000";
context.fillRect(0, 0, context.canvas.width, context.canvas.height);
context.canvas.width = context.canvas.width;
Creating a rectangle that paints the whole screen was key for mobile. beginPath() will clear all the old paths for you. For some reason it kept leaving the last path I drew even when I was trying to clear the whole thing. Have fun!