Find the answer to your Linux question:
Results 1 to 6 of 6
Eventually I'll install something, just to try it little and eventually keep it, and many times I'll want to uninstall it. OK. But I've noticed that the package manager (adept) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214

    Question How to uninstall unrequired dependencies?


    Eventually I'll install something, just to try it little and eventually keep it, and many times I'll want to uninstall it. OK. But I've noticed that the package manager (adept) installs its dependencies, but will not remove them with the program. And to figure which of the program's dependencies is not a dependency of anything else is very hard do to, if possible at all.

    I've also looked for logs but the closest things I've found in /var/logs (dpkg.log.# files) are logs of a few months old history of installing and uninstalling...

    Is there some program or command that will verify automatically which packages are not being used by anything? I was reading about it, apparently there's "apt-get autoremove" command, but only in ubuntu, and there's something analog in synaptic, which I think that is the "local/obsolete" status... but it lists the very browser I'm using in it.

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Here are a couple HowTos regarding indepth cleanup of apt-get systems:

    How to spring-clean an Apt-based distro | Free Software Magazine

    Cleaning up a Ubuntu GNU/Linux system -- Ubuntu Geek

    Hopefully one or both of them will help.
    oz

  3. #3
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Apparently, aptitude will remove dependencies but synaptic and apt-get will not. These differences in package managers is one of the main reasons why I never could quite adapt to Ubuntu. However, if you just want to do some clean up you can run:
    Code:
    sudo apt-get autoclean
    or
    Code:
    sudo apt-get clean
    From the apt-get man page:
    clean
    clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When APT is used as a dselect( method, clean is run automatically. Those who do not use dselect will likely want to run apt-get clean from time to time to free up disk space.
    autoclean
    Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control. The configuration option APT::Clean-Installed will prevent installed packages from being erased if it is set to off.
    EDIT: Smiley face not intended.

  4. #4
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    I've tried aptitude, but I had a little accident (that thing seems to have been designed to be uninteligible) and now I'm with a weird cursor in fluxbox, and I don't know how set "industrial" back. But, besides that, it freed me almost 100MB, apparently with no other collateral damage, as far as I could notice.

  5. #5
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    apt-get clean and apt-get autoclean are for removing the package install files that were downloaded.

    apt-get autoremove

    This is what you are looking to use to get rid of anything installed that isn't depended on by something else

  6. #6
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    I think that the "autoremove" parameter exists only on Ubuntu variations or perhaps Debian Lenny and Sid, which is not my case, but thanks. The other ones I knew, but I was wondering how much I could free by erasing lots of ex-dependencies that I thought I had.


    _____________________

    Addendum about the mouse cursor issue: I've done what is suggested here, and it worked. Actually I had to create the "default" directory that didn't exist before. Now I got to go buy some elephant tranquilizers in order to try to figure how to get rid of KDM and stick only with console login, without making a major mess and losing the window managers in the process.

Posting Permissions

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