Can't use sudo?

After the update to Plasma 6 I noticed a lot of orphaned packages related to plasma 5 so tried to run:

sudo pacman -Qqdt | pacman -Rns -
error: you cannot perform this operation unless you are root.

Huh? Interestingly the sudo did ask for my password on first run, but only after running the pacman command and giving the error… Not sure what to make of this.

Doh, realized my mistake right after posting the OP. sudo goes after the pipe. As such:

pacman -Qqdt | sudo pacman -Rns -



This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.