Dependency and Autoremove Issues

If none of the more specific forums is the right place to ask

Dependency and Autoremove Issues

Postby felixgp » 2018-02-12 19:25

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?
felixgp
 
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

Postby GarryRicketson » 2018-02-12 19:46

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/debian-cleanup-tip-2-get-rid-of-obsolete-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-apt-get-dpkg-packages-cleanup-commands.html
Last edited by GarryRicketson on 2018-02-12 19:51, edited 1 time in total.
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4725
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

Postby stevepusser » 2018-02-12 19:47

You are a bit unclear. Was your "apt remove" to uninstall Transmission?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.3, Pale Moon 27.7.2, Yacreader 9.0rc1, Calligra 3.1, VLC 3.0.0, Firefox 58.0.2, QMPlay2 17.12.31
User avatar
stevepusser
 
Posts: 9209
Joined: 2009-10-06 05:53

Re: Dependency and Autoremove Issues

Postby bw123 » 2018-02-12 19:51

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.
User avatar
bw123
 
Posts: 2751
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Dependency and Autoremove Issues

Postby felixgp » 2018-02-12 21:13

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

Postby felixgp » 2018-02-12 21:16

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
felixgp
 
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

Postby GarryRicketson » 2018-02-12 21:20

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
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4725
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

Postby dilberts_left_nut » 2018-02-12 21:21

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...
User avatar
dilberts_left_nut
 
Posts: 4767
Joined: 2009-10-05 07:54
Location: enzed

Re: Dependency and Autoremove Issues

Postby felixgp » 2018-02-12 21:25

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.
felixgp
 
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

Postby GarryRicketson » 2018-02-12 21:36

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
GarryRicketson
 
Posts: 4725
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Dependency and Autoremove Issues

Postby bw123 » 2018-02-12 21:37

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.
User avatar
bw123
 
Posts: 2751
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Dependency and Autoremove Issues

Postby sunrat » 2018-02-12 22:54

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!
User avatar
sunrat
 
Posts: 2136
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Dependency and Autoremove Issues

Postby felixgp » 2018-02-13 04:25

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

Postby felixgp » 2018-02-13 04:28

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.
felixgp
 
Posts: 6
Joined: 2018-02-12 19:10

Re: Dependency and Autoremove Issues

Postby GarryRicketson » 2018-02-13 14:19

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.
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4725
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable