Results 1 to 5 of 5

Thread: move old packages from local cache instead of remove?

  1. #1
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    move old packages from local cache instead of remove?

    hi, how can i "MOVE" old packaged (.deb) from /var/cache/apt/archives to another folder? (maybe /home/user/old-packs)
    there is a command to totally remove them:
    Code:
    sudo apt-get autoclean
    apt-get autoclean: To remove all stored archives in your cache for packages that can not be downloaded anymore (thus packages that are no longer in the repository or that have a newer version in the repository).

    however i want to "move" them

    the output of auto clean is

    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Del lib**** x.y.z-7 [18.1 kB]
    Del lib***** 4:0.1.2.30ubuntu1 [98.3 kB]
    Del python 4:2.2.2-0ubuntu1 [662 kB]
    .
    .
    .
    .
    do you know a way to pipe it to mv? i'm not so good at shell scripting though

    and by the way: autoclean does keep the archives i might need to reinstall (or even those i haven't installed yet), right?
    Last edited by loolooyyyy; January 15th, 2012 at 11:13 AM.

  2. #2
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: move old packages from local cache instead of remove?

    How bothered are you that it's only the old packages? Why not just copy the whole lot?

    Btw, is there some reason you want to keep them? They're not really any use. If you want to install an older version of a package you can use Synaptic to grab the old version from the repos.

  3. #3
    dino99's Avatar
    dino99 is offline Ubuntu addict and loving it
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: move old packages from local cache instead of remove?

    Maybe you are as lazy as i am, so nautilus copy/paste is your friend. But do you really need to save packages ?

  4. #4
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: move old packages from local cache instead of remove?

    where i live internet fees are so high, paying about 350$ for what you only pay 7$
    (and the speed i gain is 65KB/s at the best, not always, usually 50)
    so every KBytes of archive i have downloaded is so precious to me, redownloading using synaptic is not an option.
    and i do need my older version packages
    so i just want the older archives out of that folder to one of my old external HDDs for later use and keep the newer ones right where they are

    @dino: there are 8GB of archive/7800 packages, it can not be manually done
    @paqman: i dont care about the backup itself, i want /var/cache/apt/archives/ as clean as possible

    thanks to you both
    Last edited by loolooyyyy; January 15th, 2012 at 11:35 AM.

  5. #5
    Join Date
    Sep 2006
    Beans
    7,686
    Distro
    Lubuntu Development Release

    Re: move old packages from local cache instead of remove?

    Using varnish, squid or apt-cacher might help to reduce the amount that has to be downloaded a second time.

    It might be worth investing in a new router / modem where you can run server software like proxy/caches. I've built my own and can run proxies, caches and torrents as I see fit.

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
  •