SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-01-11 14:02:53

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,668
Website

sudo apt-get remove --auto-remove --> it doesn't!

I though I'd look at this: wajig

Description: simple and unified package management for Debian
Wajig is a single commandline wrapper around apt, apt-cache, dpkg, /etc/init.d scripts and more, intended to be easy
to use and providing extensive documentation for all of its functions.

With a suitable sudo(1) configuration, most (if not all) package installation as well as creation tasks can be done
from a user shell. Wajig is also suitable for general system administration.

 11 Jan 14 | 10:15:59 ~
    $ sudo apt-get install --no-install-recommends wajig
{snip}
The following extra packages will be installed:
  python3-apt
The following NEW packages will be installed:
  python3-apt wajig
{snip}
Do you want to continue [Y/n]? y
{snip}
 11 Jan 14 | 10:16:21 ~
    $ 

But when I saw this command {wajig commands} - I didn't want it:

ADDREPO
    Add a Launchpad PPA (Personal Package Archive) repository

    An example that shows how to add the daily builds of
    Google's Chromium browser:

    $ wajig addrepo ppa:chromium-daily

Now ... according to the man page for apt-get there is this command:

--auto-remove
           If the command is either install or remove, then this option acts like running the autoremove command, removing unused dependency packages. Configuration Item: APT::Get::AutomaticRemove.

one would think that:

sudo apt-get remove --auto-remove wajig

would remove wajig & python3-apt - it doesn't:

 11 Jan 14 | 10:20:50 ~
    $ sudo apt-get remove --auto-remove wajig
{snip}
The following packages will be REMOVED:
  wajig
{snip}
Do you want to continue [Y/n]? y
{snip} 
 11 Jan 14 | 10:21:26 ~
    $ sudo apt-get autoremove
{snip}
The following packages will be REMOVED:
  python3-apt
{snip}
Do you want to continue [Y/n]? y

I still need to run "apt-get autoremove".

Did I miss something here or is this just not working?

Last edited by Sector11 (2014-01-11 14:04:38)


#! Forum Moderator | To #! or not to #!?  That is the question!
#! Conky = 16 Threads & the Conky Archives | Conky PitStop | OHCG'er
StartPage -  protect your privacy   |   BBQ Linux

Offline

Be excellent to each other!

#2 2014-01-11 15:06:57

ratcheer
#! CrunchBanger
Registered: 2013-07-23
Posts: 227

Re: sudo apt-get remove --auto-remove --> it doesn't!

My understanding seems to match yours. Maybe you should open a bug.

Tim

Offline

#3 2014-01-11 15:28:04

Geezer
#! Junkie
From: Never Never Land
Registered: 2013-02-19
Posts: 376

Re: sudo apt-get remove --auto-remove --> it doesn't!

I've experienced a similar issue when I remove a app, but can't seem to remove the dependencies.


There's no such thing as coffee that's too strong. cool

OHCG | LXer

Offline

#4 2014-01-11 17:04:53

hhh
Caught in the Vortex
Registered: 2010-08-04
Posts: 1,889

Re: sudo apt-get remove --auto-remove --> it doesn't!

apt and aptitude aren't perfect, that's why it's always recommend to check what they want to do before hitting Enter (especially autoremove!!! Having an extra package is much better than missing one and not knowing what it is!) I just tested installing wajig on wheezy, and sudo apt-get purge && sudo apt-get autoremove only removed two of the six packages installed. But remember...

apt HOWTO wrote:

In the beginning there was the .tar.gz. Users had to compile each program that they wanted to use on their GNU/Linux systems.

I'll take the occasional apt error, thank you very much. smile

Offline

#5 2014-01-11 17:19:27

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 3,909

Re: sudo apt-get remove --auto-remove --> it doesn't!

hhh wrote:

But remember...

apt HOWTO wrote:

In the beginning there was the .tar.gz. Users had to compile each program that they wanted to use on their GNU/Linux systems.

I'll take the occasional apt error, thank you very much. smile

I'll take Pacman, thank you very much  devil


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#6 2014-01-11 17:30:54

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,043

Re: sudo apt-get remove --auto-remove --> it doesn't!

Unia wrote:

I'll take Pacman, thank you very much  devil

Same-sex marriages are legal in Holland. Go for it!!


Point & Squirt

Offline

#7 2014-01-11 17:39:22

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 3,909

Re: sudo apt-get remove --auto-remove --> it doesn't!

Huh?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#8 2014-01-11 19:25:25

Geezer
#! Junkie
From: Never Never Land
Registered: 2013-02-19
Posts: 376

Re: sudo apt-get remove --auto-remove --> it doesn't!

@ hhh: good point and well taken. I recently borked #! by being perhaps overzealous with removing apps and dependencies. On the other hand, the fresh install was...ah..."refreshing"!  big_smile


There's no such thing as coffee that's too strong. cool

OHCG | LXer

Offline

#9 2014-01-12 01:43:07

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,620
Website

Re: sudo apt-get remove --auto-remove --> it doesn't!

Hi Sextor wink Happy new year!

There is a nice tool for cleaning up the dependency mess:

sudo apt-get install deborphan
sudo orphaner --purge

also available as gtkorphan for the GUIs smile

Offline

#10 2014-01-12 10:54:21

vicshrike
#! by Default
From: /grill
Registered: 2009-02-13
Posts: 2,986

Re: sudo apt-get remove --auto-remove --> it doesn't!

Thanks for the orphaner tool tip machinebacon, will be useful after an install & tweak spree   big_smile


#!, all else is but a shadow.

Offline

#11 2014-01-14 15:31:52

Geezer
#! Junkie
From: Never Never Land
Registered: 2013-02-19
Posts: 376

Re: sudo apt-get remove --auto-remove --> it doesn't!

@machinebacon: Yes, many thanks. It works! big_smile


There's no such thing as coffee that's too strong. cool

OHCG | LXer

Offline

#12 2014-01-17 04:52:53

johnraff
#!Drunkard
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 2,855
Website

Re: sudo apt-get remove --auto-remove --> it doesn't!

Could it be apt's --auto-remove option is looking at the dependency situation before performing  the "remove" action in the command, instead of after?

Though in Statler:

john@raffles3:~$ sudo apt-get install --no-install-recommends  wajig
The following extra packages will be installed:
  dselect
Suggested packages:
  fping reportbug apt-move dpkg-repack gkdebconf lynx gnome-terminal
  gnome-tasksel vrms apt-show-versions
The following NEW packages will be installed:
  dselect wajig
-------
john@raffles3:~$ sudo apt-get remove --auto-remove wajig
The following packages will be REMOVED:
  dselect wajig
0 upgraded, 0 newly installed, 2 to remove and 9 not upgraded.
Removing wajig ...
Removing dselect ...
Processing triggers for man-db ...

it looked OK.


John
--------------------
( a boring Japan blog , idle twitterings  and GitStuff )
#! forum moderator

Offline

#13 2014-01-17 13:37:17

wuxmedia
wookiee madclaw
From: Back in Blighty
Registered: 2012-03-09
Posts: 1,472
Website

Re: sudo apt-get remove --auto-remove --> it doesn't!

gutterslob wrote:
Unia wrote:

I'll take Pacman, thank you very much  devil

Same-sex marriages are legal in Holland. Go for it!!

same in france;
http://en.wikipedia.org/wiki/Civil_solidarity_pact

PACSman?

Offline

#14 2014-01-17 15:39:58

wmdiem
#! CrunchBanger
Registered: 2008-12-26
Posts: 187

Re: sudo apt-get remove --auto-remove --> it doesn't!

This thread reminded me of a little script I wrote way back in the day.

rollback will let you undo the last x changes apt (or aptitude or dpkg) made to your system. I wrote it out of frustration whit apt installing something, dragging in 100 of MB of dependencies, then--when I realized that whatever I just installed wasn't what I wanted and did apt-get purge--it would free something like a few MB and leave most of the dependencies.

Note that I haven't used the script in years, but it worked when I wrote it. Also you could obviously do the same thing manually (look at dpkg's log to see what apt dragged in but didn't remove).

Offline

#15 2014-01-17 18:04:49

retf
#! CrunchBanger
From: On top of spaghetti
Registered: 2013-12-25
Posts: 200

Re: sudo apt-get remove --auto-remove --> it doesn't!

I think apt errs on the side of caution when removing singly listed packages.  The autoremove option, on the other hand, has always seemed to be too zealous for me.  Many times if I use autoremove, I find that some program somewhere doesn't function, and I end up re-installing several packages.  This is probably because I sometimes build new software from source.  I also have a few games that require 32 bit libraries - so the autoremove option doesn't usually work for me.  However, that means I usually have about 200 packages in the autoremove list after a year of use...

--- I noticed a potential problem with the rollback script.  It might not function as expected if you use the logrotate log compression utility, since you may have several dpkg.log.x.gz files rather than just a single dpkg.log file... I don't know perl, but it might be better to include a more general method which would include all possible 'standard' log files...

Last edited by retf (2014-01-17 18:05:45)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo