How to remove older css files after webassets rebuilds the scss for a python flask app?

Solution
from os.path import join
from shutil import rmtree

app = Flask(__name__)

rmtree(join(app.static_folder, 'css'), ignore_errors=True)