add "sudo" before apt-get autoremove in warning

Bug #658960 reported by userdce on 2010-10-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)

Bug Description

Binary package hint: apt

The following packages were automatically installed and are no longer required:
Use 'apt-get autoremove' to remove them.

while it should give the warning as
Use 'sudo apt-get autoremove' to remove them

SUDO should be added.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: synaptic 0.63.1ubuntu14
ProcVersionSignature: Ubuntu 2.6.35-22.34-generic
Uname: Linux 2.6.35-22-generic x86_64
NonfreeKernelModules: wl fglrx
Architecture: amd64
Date: Tue Oct 12 01:22:51 2010
ExecutablePath: /usr/sbin/synaptic
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
 PATH=(custom, no user)
SourcePackage: synaptic

userdce (userdce) wrote :
Changed in apt (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
Julian Andres Klode (juliank) wrote :

Perhaps for oneiric.

userdce (userdce) wrote :

 for Quantal ? :)

tags: added: bitesize
A. Eibach (andi3) wrote :

>Use 'apt-get autoremove' to remove them.

>while it should give the warning as
>Use 'sudo apt-get autoremove' to remove them

It NOT that simple.
There should be made a case decision:

- Are we really sudo'ing?
- Are we working directly under root, i. e. the shell with the hash prompt?

In the latter case, a 'sudo' would be total nonsense.

In a nutshell, we have to check for internal user ID (zero, non-zero).

Jarno Suni (jarnos) wrote :

How about
"Use 'apt-get autoremove' as superuser to remove them."?

Or maybe it would be enough that the error message printed by `apt-get autoremove` when ran as regular user could be more user friendly. Currently it is:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
(apt 1.0.1ubuntu2)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers