The avast structure (and that of other similar products), involving basic level drivers, is not - as far as I know - amenable to the kind of command line operations that you hope. We can wait for input from the avast team directly but I regret that I believe they will not provide adequate comfort.
Forgive the "cold water" but I think the best would be to restore (I am surprised at 5 hours - my Acronis True Image restore - rarely required - takes less than 30 minutes for my basic system recovery) your system, uninstall avast, and then proceed with your OS upgrade again.
I understand this is not your preferred route, I regret the extra work it means to you but it represents the basis on which you will move forward and I am sure one that you wish to be as reliable as possible,