Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: How to remove unused dependencies ?

  1. #1
    Join Date
    Feb 2005
    Beans
    13

    How to remove unused dependencies ?

    Hi,

    When I install a program, for example tuxracer, I do "apt-get install tuxracer", it searches for its depencies that are not installed on my computer, then it downloads them and tuxracer works .

    The problem is when I want to remove tuxracer : I do "apt-get remove tuxracer" and then "dpkg --purge tuxracer" but it doesn't remove the dependencies it had installed during the "apt-get install tuxracer" !

    So for example, the package "tuxracer-data" is still installed, and I know it has installed other stuff but I don't remember their name so I can't remove them, and it uselessly uses diskspace !

    It really annoyes me and I think other people, but maybe I don't do how I would must do.

    Can you help me to not have a garbaged disk please ?

    Thank you,
    Best regards and congratulations for this wonderful Ubuntu Hoary,
    Roman,

  2. #2
    Join Date
    Feb 2005
    Beans
    13

    Re: How to remove unused dependencies ?

    I just found deborphan, what a good software !
    aptitude purge `deborphan --guess-all`
    dpkg --purge `deborphan --guess-all`
    I love it.

  3. #3
    Join Date
    Feb 2005
    Location
    Heverlee, Belgium
    Beans
    139
    Distro
    Ubuntu 6.06

    Re: How to remove unused dependencies ?

    But is it safe to use?

  4. #4
    Join Date
    Jan 2005
    Location
    Firenze, Italy
    Beans
    279

    Re: How to remove unused dependencies ?

    Good question, since i'm also interested in that package but not sure about the results since i can't have my machine blocked...

    MC

  5. #5
    Join Date
    Feb 2005
    Beans
    13

    Re: How to remove unused dependencies ?

    I think it's safe, seeing how it determines if a package is good to remove or not.
    Anyway, I removed (and purged) all the stuff it gave me with a "deborphan --guess-all" and I don't see any problem for now, and I rebooted the PC without any problem too.

  6. #6
    Join Date
    Jun 2005
    Location
    Belgium
    Beans
    392
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to remove unused dependencies ?

    I saved 104MB of disk space this way. It doesn't seem much, but it was on an older laptop with only 6GB disk space, so it made a difference.

    Rather than directly removing everything, I removed everything manually in synaptic to make sure no other packages were removed. I used the following command to obtain a handy list of the packages: deborphan --guess-all | sort | less


    A feature should be added to synaptic to show a list with orphaned packages. There is a list with local or obsolete packages, but it doesn't show a lot (only programs I installed manually).
    Atomic military built-up can be reversed: out-law the bomb!

  7. #7
    Join Date
    Sep 2006
    Beans
    2

    Re: How to remove unused dependencies ?

    I've been wanting a tool like this ever since I started using linux. If you keep installing a bunch of junk and its dependencies and then uninstall that same junk, over time you will end up with a pretty bloated HDD.

    I really think that package managers should, when you uninstall a package, check all of the dependencies that that particular package has to see if they are required by any other packages. If there are packages that were depended on that are no longer depended on, ask the user if they want to uninstall those packages while leaving the rest alone... sort of like a "Reference Counting" garbage collection algorithm.

    I think that is what Windows XP does. I'm pretty sure I've had times where I was uninstalling a package and was asked if I wanted to delete a dll that no longer appeared to be required.

  8. #8
    Join Date
    May 2005
    Location
    Istanbul
    Beans
    262
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How to remove unused dependencies ?

    Aptitude can remove unused dependencies if depending software installed by it. So, it's best to use aptitude instead of apt-get or synaptic.

    I think that is what Windows XP does. I'm pretty sure I've had times where I was uninstalling a package and was asked if I wanted to delete a dll that no longer appeared to be required.
    When Windows asks you about the dll file, it also warns you that "it may be needed by some other program.", And you can never know which program may need it. So you keep everything or will face unexpected errors when running another program.

  9. #9
    Join Date
    Sep 2006
    Location
    Alserio. Como (Italy)
    Beans
    22

    Re: How to remove unused dependencies ?

    windows leaves a lot of rubbish on your hdd but it doesn't tell you where, so you find yourself with a lot of "${34k5jhk3j}" directories and you don't know which one you could delete without screwing the whole thing up.
    Anyway, what's the differences between the cleaning process of aptitude and deborphan?! I mean, which one's the safer, the quicker?! Should someone ask for this feature for synaptic in the future Ubuntu release (i'd vote for it!!)?!
    thanks

  10. #10
    Join Date
    Oct 2006
    Location
    Surrey, UK
    Beans
    168
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to remove unused dependencies ?

    Having read various fora on this subject, but being no expert, I use aptitude instead of apt-get for any software that I'm just trialing and am likely to want to remove later. I only use apt-get or Synaptic for packages that I know are going to stick around.
    Alan Rogers || Surrey, UK || Mint Julia, Ubuntu Oneiric || use Search before Post
    Please don't just copy, paste and run code. If you're not sure what it does, ask!

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •