Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Dependency and Autoremove Issues

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
felixgp
Posts: 6
Joined: 2018-02-12 19:10

Dependency and Autoremove Issues

#1 Post by felixgp »

I am having an issue cleaning up orphan packages in Debian. As an example I tested with Transmission:
  • apt install downloads 47 packages
    apt remove gets rid of one packages
    apt autoremove gets rid of 6 packages
    deborphan shows one package
What happened to the other 40 packages? My system has become quite bloated, with 1400 packages and no DE; sorting through these one at a time is not an option.
Why is this happening? What can be done to fix this?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

#2 Post by GarryRicketson »

cleaning up orphan packages in Debian
Why is this happening? What can be done to fix this?
1.I can not imagine why, I know nothing about your system, and have no means to look at it it get the information needed.
2. What can be done to fix this? Read some of the various results in the search string , there are many that should give you the information.

Maybe : https://raphaelhertzog.com/2011/02/07/d ... -packages/
But , please, actually read some documentation, completely before just "blindly" trying any commands. Also it is wise to read the manual for a specific command, if you do not understand what it does.
You could blindly remove them with aptitude purge ~o (or aptitude purge ?obsolete) but you might want to first verify what those package are. There might be some packages that you have manually installed, that are not part of any current APT repository, and that you want to keep around nevertheless (I have skype, dropbox and a few personal packages for example). You can get the list with aptitude search ?obsolete…
========= edited ========
Another good one from the same search results:
https://raymii.org/s/tutorials/Debian-a ... mands.html
Last edited by GarryRicketson on 2018-02-12 19:51, edited 1 time in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Dependency and Autoremove Issues

#3 Post by stevepusser »

You are a bit unclear. Was your "apt remove" to uninstall Transmission?
MX Linux packager and developer

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Dependency and Autoremove Issues

#4 Post by bw123 »

I use aptitude in "flat list" mode every now and then (add ~i to the filter) hit 'i' twice to view dependencies. You can scroll through installed pkgs and see in the bottom window if no other pkg depends on them. Hit _ to mark for purge. It goes pretty fast. If you can make your mind up fast about what you want to keep you should average about 1 per sec, less than 30 min.

I'm not sure why mine get out of whack occasionally, but I think it's from using multiple pkg names on apt command line, dpkg -i or -r and other stuff like that.
resigned by AI ChatGPT

felixgp
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

#5 Post by felixgp »

GarryRicketson wrote:2. What can be done to fix this? Read some of the various results in the search string , there are many that should give you the information.
I have, of course, searched this issue quite a bit. Thank you for the links, they did help clean up some of my packages; however the issue with autoremove is still present, and even with the tools provided I was not able to get rid of the 40 dependencies installed by Transmission (I am only using transmission as an example, I actually do want to use Transmission; I have noticed this issue with other packages).

felixgp
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

#6 Post by felixgp »

stevepusser wrote:You are a bit unclear. Was your "apt remove" to uninstall Transmission?
Yes. Basically:
  • # apt install transmission #this installs a total of 47 packages
    # apt remove transmission #this removes a single packages, this being transmission
    # apt autoremove #this removes 6 packages

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

#7 Post by GarryRicketson »

I actually do want to use Transmission
If you remove the dependencies, it won't run. Are sure you want to do that ?
That is why they are called dependencies, the program depends on them to run.

Or maybe I am just misunderstanding something

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Dependency and Autoremove Issues

#8 Post by dilberts_left_nut »

The answer is in the dependencies, and which other packages depend/recommend/suggest them too.
'aptitude why' might provide some insight.
AdrianTM wrote:There's no hacker in my grandma...

felixgp
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

#9 Post by felixgp »

GarryRicketson wrote:If you remove the dependencies, it won't run. Are sure you want to do that ?
I am just using transmission as an example. I can always redownload the dependencies later. I am using it to prove that the issue is present as it is one of the more egregious examples I've seen.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

#10 Post by GarryRicketson »

Oh, ok, well now it is making more sense,
by felixgp » I am using it to prove that the issue is present ---snip--
No need to prove anything, most of us are aware of this, it is a common issue with large, "mega" packages,
dilberts_left_nut wrote:The answer is in the dependencies, and which other packages depend/recommend/suggest them too.
'aptitude why' might proide some insight.

To sort through everything and try to decide what you can safely remove,and what you shouldn't remove can be a rather tedious task,
as far as I know there is no real easy simple solution, all though "apt"
and 'aptitude' have options that can help make it a little easier.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Dependency and Autoremove Issues

#11 Post by bw123 »

felixgp wrote:
GarryRicketson wrote:If you remove the dependencies, it won't run. Are sure you want to do that ?
I am just using transmission as an example. I can always redownload the dependencies later. I am using it to prove that the issue is present as it is one of the more egregious examples I've seen.
well heck that's pretty silly. I think i'll just ignore any further posts, bye.
resigned by AI ChatGPT

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Dependency and Autoremove Issues

#12 Post by sunrat »

I only see 2 dependencies for transmission, not 47.

Code: Select all

$ apt-cache depends transmission
transmission
  Depends: transmission-common
 |Depends: transmission-gtk
 |Depends: transmission-qt
  Depends: transmission-cli
Check your apt history log.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

felixgp
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

#13 Post by felixgp »

sunrat wrote:I only see 2 dependencies for transmission, not 47.

Code: Select all

$ apt-cache depends transmission
transmission
  Depends: transmission-common
 |Depends: transmission-gtk
 |Depends: transmission-qt
  Depends: transmission-cli
Check your apt history log.
Dependency might've been the wrong word. In all though, installing Transmission downloaded a total of 47 new packages (including Transmission itself). Probably there were dependencies of dependencies in there.

felixgp
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

#14 Post by felixgp »

GarryRicketson wrote: No need to prove anything, most of us are aware of this, it is a common issue with large, "mega" packages,
Thank you this was the type of answer I'd been looking for (though not the answer I hoping for). If there's nothing to be done then there's not much to be said.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

#15 Post by GarryRicketson »

Ok, well , your welcome.

There is a tutorial , in the "How to" section, (I think) , "How to deal with Megaspackages", or something like that,(Metapackages) not Mega, ===edited===
Sunrat>>The actual term is "metapackages"
---end edit---
...also and you might all ready know this,
Use the -s (simulate) option, when running 'apt' or 'aptitude', it will help show you what is going to be removed, etc, without actually removing it.
I don't know about "transmission" in particular, but Gnome , is another one,
and trying to remove it all is almost impossible, the other problem is sometimes some package one wants to install, pulls in gnome packages as well, even on a system where Gnome was not installed.
The only thing I know to do is try to look at the dependencies listed before I install something, and if there is a lot of stuff I don't want, maybe not install it.
Offtopic:
I have been trying to compile some programs for a different OS (minix 3), and it is a nightmare, often I keep getting errors, "needs this or that", and so another thing needs to be downloaded and compiled, and so on,.. after it all is actually installed, removing it can be just as difficult, tedious.
Last edited by GarryRicketson on 2018-02-14 00:33, edited 1 time in total.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Dependency and Autoremove Issues

#16 Post by sunrat »

The actual term is "metapackages".

I'm still curious how installing transmission pulled in 47 packages. I just ran simulated install and got 6 packages. A look at /var/log/apt/history.log would be illuminating.

Code: Select all

$ apt install -s transmission
NOTE: This is only a simulation!
...
The following NEW packages will be installed:
  libminiupnpc10 libnatpmp1 minissdpd transmission transmission-common transmission-gtk
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Dependency and Autoremove Issues

#17 Post by Wheelerof4te »

transmission is a meta-package. It is there to make installation of Transmission torrent client easier, by pulling all needed dependencies. Same with gnome meta-package, libreoffice meta-package etc.
Sometimes pulled packages can be used by other programs, so they stay. Example, removing gnome meta-package will just remove that and few other packages. It won't wipe out GNOME DE.
Note that transmission clent doesn't need 47 packages in GNOME.

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Dependency and Autoremove Issues

#18 Post by Wheelerof4te »

If that was some kind of virus page, let us pray for your well being.
DONT. DO. THAT.
corbett wrote:check more about it to click here

Caitlin
Posts: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Re: Dependency and Autoremove Issues

#19 Post by Caitlin »

Every time you install a package by name, up to hundreds of other packages gets installed with it.

When a package is developed, the programmer builds it, generally, with the latest and greatest versions of the libraries. This means even if you have all the libraries already on your system, they will automatically be upgraded when the package you chose is installed, even if it would have worked with the versions you already had.

Another problem is when one package draws on some functionality from something else, and that something else is stated specifically rather than generically. I may have the details wrong, but somewhere deep in KWrite a beep is generated if something goes wrong, and to produce that beep means the entire VLC music system has to be installed also, along with phonon, which VLC needs. The programmer liked VLC, so everybody's going to have VLC whether they want it or not.

Still another problem is recommended packages -- where one package is enhanced by some other package being there, even though that other package is not strictly required. This one is easy to fix; I specify --no-install-recommends with every apt-get.

If you try to get rid of this "crapware", as I call it, it then wants to deinstall the package you originally wanted. This is a problem, and is one of the major headaches of the apt system design.

You can de-install single packages with dpkg -force-depends but this really isn't a solution. If anybody has any suggestions as how to best remove crapware, let me know.

The bottom line is that those 1400 packages can't be uninstalled because they are considered to be installed and in use in your system.

Caitlin

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Dependency and Autoremove Issues

#20 Post by Head_on_a_Stick »

@Caitlin, have you considered Slackware? :mrgreen:
deadbang

Post Reply