That’s a bad idea, because it’s guaranteed to break your system.
Also, you are probably better off updating by way of pacman
— not pamac
— from within a tty
environment, and rebooting right away after the process has finished.
For now, I will leave you with these two HowTos, hoping they may be of help…