PDA

View Full Version : [ubuntu] How to remove configuration files using super user privileges



varunaub
August 27th, 2011, 06:12 AM
when issued the command
dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purgethe terminal messages that
dpkg: error: requested operation requires superuser privilegeWhen sudo is included
sudo dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge the same message is given
dpkg: error: requested operation requires superuser privilege 1 Who is the superuser in Ubuntu isn't it the root?:confused:

2 How to remove Configuration files?:confused:

Mark Phelps
August 27th, 2011, 08:30 PM
Instead of using sudo the way you are, you could login as root by entering "sudo -i" -- but bet AWARE, that you can then cause MAJOR damage to your install, especially if you removal becomes overly aggressive and damages system components. Rememer, as ROOT, you can do ANYTHING -- even trash your install.

snowpine
August 27th, 2011, 08:40 PM
sudo does not extend past the | or "pipe" symbol. So you need to use sudo for each part of your command.

As mentioned above "sudo -i" will give you a root shell.

varunaub
August 28th, 2011, 12:44 PM
What is a "root shell"?

snowpine
August 28th, 2011, 03:44 PM
What is a "root shell"?

"sudo -i" makes it so every command you type after that is "sudo" or root

When you are done you can type "exit" and you'll go back to regular user privileges.

If the thought of this makes you uncomfortable then don't use it.


Special notes on sudo and shells

None of the methods below are suggested or supported by the designers of Ubuntu.

Please do not suggest this to others unless you personally are available 24/7 to support the user if they have issues as a result of running a shell as Root.

To start a root shell (i.e. a command window where you can run Root commands), starting Root's environment and login scripts, use:

sudo -i (similar to sudo su - , gives you roots environment configuration)

https://help.ubuntu.com/community/RootSudo

Mark Phelps
August 28th, 2011, 04:14 PM
You should notice the warnings that snowpine included ...

As I said earlier, using the root shell can cause MAJOR DAMAGE to your install. So, if all you're trying to do is remove a few small config files -- you would really be better off leaving it alone.

ezio5285
March 1st, 2013, 11:08 PM
I got an error on terminal too..

ezio@ASUS-PC:~$ cd Desktop
ezio@ASUS-PC:~/Desktop$ dpkg -i '/root/Desktop/minidwep-gtk-30419-ubuntu-32bit.deb'
dpkg: error: requested operation requires superuser privilege