Results 1 to 8 of 8

Thread: Cached packages (debs)

  1. #1
    Join Date
    May 2013
    Beans
    154
    Distro
    Ubuntu

    Question Cached packages (debs)

    Howdy,

    I'm using Ubuntu since years so I've about 30GB of cached packages because I've limited quota of WiMAX Internet connection so I wonder how can I get rid of old packages without removing the unused packages?

    Exmaple: I've the following firefox debs while I just want the recent version only:
    Code:
    firefox_16.0.2+build1-0ubuntu0.12.04.1_amd64.deb  firefox_18.0+build1-0ubuntu0.12.04.3_amd64.deb    firefox_21.0+build2-0ubuntu0.12.10.2_amd64.deb     firefox_24.0+build1-0ubuntu0.13.04.1_amd64.deb
    firefox_17.0.1+build1-0ubuntu0.12.04.1_amd64.deb  firefox_19.0.2+build1-0ubuntu0.12.10.1_amd64.deb  firefox_22.0+build2-0ubuntu0.12.10.1_amd64.deb     firefox_24.0+build1-0ubuntu0.13.04.1_amd64.deb.ug_
    firefox_17.0+build2-0ubuntu0.12.04.1_amd64.deb    firefox_19.0+build1-0ubuntu0.12.10.1_amd64.deb    firefox_22.0+build2-0ubuntu0.12.10.2_amd64.deb
    firefox_18.0.1+build1-0ubuntu0.12.10.1_amd64.deb  firefox_19.0+build1-0ubuntu0.12.10.2_amd64.deb    firefox_23.0+build2-0ubuntu0.13.04.1_amd64.deb
    firefox_18.0.2+build1-0ubuntu0.12.10.1_amd64.deb  firefox_20.0+build1-0ubuntu0.12.10.3_amd64.deb    firefox_24.0+build1-0ubuntu0.13.04.1_amd64(0).deb
    P.S. I always sync the path of cached packages (/var/cache/apt/archives/) because Ubuntu always delete the old and the unused packages!!!
    Last edited by mbnoimi; October 26th, 2013 at 04:14 PM.

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: Cached packages (debs)

    sudo apt-get autoclean

    Excerpt from the apt-get man page:
    Code:
           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.

  3. #3
    Join Date
    May 2013
    Beans
    154
    Distro
    Ubuntu

    Re: Cached packages (debs)

    sudo apt-get autoclean
    I tried it before; It removes some packages which I need them for example it removes amarok_2.7.1-0ubuntu0.1~ubuntu13.04~ppa1_amd64.deb which is needed and already used!

  4. #4
    Join Date
    Aug 2006
    Location
    Pawtucket, RI
    Beans
    40
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: Cached packages (debs)

    Quote Originally Posted by mbnoimi View Post
    I tried it before; It removes some packages which I need them for example it removes amarok_2.7.1-0ubuntu0.1~ubuntu13.04~ppa1_amd64.deb which is needed and already used!
    If it is already installed, why do you need to keep the .deb file?

    If you are thinking of copying the same deb file for installing on another machine, you might take a look at apt-cacher-ng. It serves as a caching proxy for the ubuntu servers, and its cleanup rules might be more consistent with what you are thinking about.

  5. #5
    Join Date
    May 2013
    Beans
    154
    Distro
    Ubuntu

    Re: Cached packages (debs)

    If it is already installed, why do you need to keep the .deb file?
    I've other PCs needs theses debs.

    you might take a look at apt-cacher-ng. It serves as a caching proxy for the ubuntu servers, and its cleanup rules might be more consistent with what you are thinking about.
    It may what I'm looking for, but is there any GUI interface to configure it?

  6. #6
    Join Date
    Aug 2006
    Location
    Pawtucket, RI
    Beans
    40
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: Cached packages (debs)

    Quote Originally Posted by mbnoimi View Post
    I've other PCs needs theses debs.


    It may what I'm looking for, but is there any GUI interface to configure it?
    I'm not aware of one, but the config file is not rocket science.

  7. #7
    Join Date
    May 2013
    Beans
    154
    Distro
    Ubuntu

    Re: Cached packages (debs)

    I'm not aware of one, but the config file is not rocket science.
    Sorry for delaying this thread

    I tested apt-cacher-ng and I found it very awesome but it works in case all PCs connecting together, In my case I've many PCs don't connect together so I sync the cached deb manually which make the size too big.

    Do you've any solution to get rid of these unneeded packages?

  8. #8
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: Cached packages (debs)

    Quote Originally Posted by mbnoimi View Post
    I tried it before; It removes some packages which I need them for example it removes amarok_2.7.1-0ubuntu0.1~ubuntu13.04~ppa1_amd64.deb which is needed and already used!
    If you don't trust autoclean, then you must clean your cache manually.
    You should probably be upgrading from 13.04 soon anyway.

Tags for this Thread

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
  •