Redirecting APT cache


Results 1 to 3 of 3

Thread: Redirecting APT cache

  1. #1
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986

    Redirecting APT cache

    I was laughing about klackenfus's post with the ancient RH install, and then work has me dig up an old server that has been out of use for some time. It has some proprietary binaries installed that intentionally tries to hide files to prevent copying (and we are no longer paying for support or have install binaries), so a clean install is not preferable.

    Basically it has been out of commission for so long, that the apt-get upgrade DL is larger than the /var partition (apt caches to /var/cache/apt/archives).

    I can upgrade the bigger packages manually until I get under the threshold, but then I learn nothing new. So I'm curious if I can redirect the cache of apt to a specified folder either on the command line or via a config setting? And don't answer with ln -s

    Distro = Debian of course.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  2. #2
    Join Date
    Oct 2002
    Posts
    547
    In your apt.conf file either add or modify the following directive:

    dir::cache::archives "/path/to/new/cache"

    in "cache" above, you need to have a sub-dir named "partial. i.e. "/path/to/new/cache/partial"

    Or for temporary usage:
    apt-get -o dir::cache::archives="/path/to/new/cache" update
    apt-get -o dir::cache::archives="/path/to/new/cache" upgrade

    But since the system is likely low on HD space all around why not just add a new HD and relocate /var entirely?

    Cheers

    Mike
    Last edited by techwise; 01-05-2011 at 06:37 PM.
    $whatis microsoft
    microsoft: nothing appropriate

  3. #3
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    Thanks, just what I was looking for~ I will go the temp route as if they want this thing up for any appreciable length of time I'll have my regular cron jobs going to get it in sync with the rest of the servers.

    Quote Originally Posted by techwise View Post
    But since the system is likely low on HD space all around why not just add a new HD and relocate /var entirely?
    It wasn't a rush or even critical. It was one of those hey if you can get this piece of junk up and running great, if not to the trash heap. The apt-get cache size is larger than the installed use in /, so I think it is just a case of this thing being off for over 5 years. Once up-to-date, the partitions should hold for the limited function it needs to serve. Mainly I just needed the networking updated to work with this network which has Windows, MACs, and Linux boxes plus ADC.

    Honestly, I was surprised the HD spun up the first time. Cheers to Western Digital.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

Posting Permissions

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