Couldn't you just `shutil.rmtree(FFCKernel._cachedir, ignore_errors=True)`?