Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run this command (see section 4 from here

dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge

I use sudo at the beginning but anyway I get an error:

user@user-desktop:~$ sudo dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge
[sudo] password for user:
dpkg: error: requested operation requires superuser privilege

Why sudo doesn't work? What else should I type?

share|improve this question
sudo -i dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge

This may run your command with ROOT priviliges. Sudo and root is different. Reference

share|improve this answer

try to login as root, to gain the super-power, you can do this by typing:

sudo -i

then write (copy/paste :: Ctrl + C / Ctrl + Shift + V <-- paste in terminal) your command in terminal, and it should work

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.