Firstly, don’t use sudo with pamac. It’ll ask for authentication when required.
Secondly, I’ve seen similar things since the last update. I don’t know what can bee the cause, but a possible workaround in that case is using pacman instead of pamac, so try that and see:
I have seen this weird output being reported as well.
should give you a clear and readable output,
likely stating towards the end a conflict between tlp and power-profile-daemon (or something like that)
You have to uninstall one or the other to resolve the conflict.
Using sudo with pamac can have undesirable effects, especially when building packages. if in doubt, don’t use sudo. Pamac will ask for escalated rights if needed.
pamac clean might be better for cleaning pamac cache