Announcement

Collapse
No announcement yet.

Is /var/cache/apt/archives partially cleaned automatically?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is /var/cache/apt/archives partially cleaned automatically?

    Trying to use APTonCD which reads from /var/cache/apt/archives I found that some installed packages are not there (e.g. Synaptic).

    Is /var/cache/apt/archives partially cleaned or is it kept intact since system installation?

    I read the following here: http://www.freesoftwaremagazine.com/...t_based_distro

    "By default, on edgy eft, it will delete files that are both 30 days old (modification time) and have been in the directory for 30 days (status change time). It will also attempt to keep the size of the directory below a specified value (500 MB by default on edgy eft) while still trying to avoid deleting files before they have been used."

    How is it on Kubuntu Gutsy?

    #2
    Re: Is /var/cache/apt/archives partially cleaned automatically?

    It's probably cleaned at some point...
    You can download the package to the archives with "sudo apt-get --download-only package".
    For external use only.

    Comment


      #3
      Re: Is /var/cache/apt/archives partially cleaned automatically?

      Originally posted by SheeEttin
      It's probably cleaned at some point...
      ...
      Can I decide on the cleaning policy somehow?

      Comment


        #4
        Re: Is /var/cache/apt/archives partially cleaned automatically?

        There is /etc/cron.daily/apt :

        #!/bin/sh
        #

        #set -e
        #
        # This file understands the following apt configuration variables:
        #
        # "APT::Periodic::Update-Package-Lists=1"
        # - Do "apt-get update" automatically every n-days (0=disable)
        #
        # "APT::Periodic:ownload-Upgradeable-Packages=0",
        # - Do "apt-get upgrade --download-only" every n-days (0=disable)
        #
        # "APT::Periodic::AutocleanInterval"
        # - Do "apt-get autoclean" every n-days (0=disable)
        #
        # "APT::Periodic::Unattended-Upgrade"
        # - Run the "unattended-upgrade" security upgrade script
        # every n-days (0=disabled)
        # Requires the package "unattended-upgrades" and will write
        # a log in /var/log/unattended-upgrades
        #
        # "APT::Archives::MaxAge",
        # - Set maximum allowed age of a cache package file. If a cache
        # package file is older it is deleted (0=disable)
        #
        # "APT::Archives::MaxSize",
        # - Set maximum size of the cache in MB (0=disable). If the cache
        # is bigger, cached package files are deleted until the size
        # requirement is met (the biggest packages will be deleted
        # first).
        #
        # "APT::Archives::MinAge"
        # - Set minimum age of a package file. If a file is younger it
        # will not be deleted (0=disable). Usefull to prevent races
        # and to keep backups of the packages for emergency.
        and in /etc/apt/apt.conf.d/10periodic:
        APT::Periodic::Update-Package-Lists "0";
        APT::Periodic:ownload-Upgradeable-Packages "0";
        APT::Periodic::AutocleanInterval "0";
        APT::Periodic::Unattended-Upgrade "0";
        and in /etc/apt/apt.conf.d/20archive:
        APT::Archives::MaxAge "30";
        APT::Archives::MinAge "2";
        APT::Archives::MaxSize "500";

        Links:

        Could autoclean be, well auto?
        http://ubuntuforums.org/showthread.php?t=227797

        Keeping unstable machines up to date easily.
        http://www.debian-administration.org/articles/43

        Saving Time :: Debian APT Auto-Update
        http://www.thedailyhtf.com/
        Before you edit, BACKUP !

        Why there are dead links ?
        1. Thread: Please explain how to access old kubuntu forum posts
        2. Thread: Lost Information

        Comment


          #5
          Re: Is /var/cache/apt/archives partially cleaned automatically?

          To summarize Rog's post. Adept should be cleaning it up every 30 days.

          Comment


            #6
            Re: Is /var/cache/apt/archives partially cleaned automatically?

            Ah, that's the one.
            I was thinking of mentioning that file, but I can never find it when I want it...
            For external use only.

            Comment


              #7
              Re: Is /var/cache/apt/archives partially cleaned automatically?

              Thanks, that's the one.

              I guess Adept should have those parameters configurable in it's menus someday.

              Comment


                #8
                Re: Is /var/cache/apt/archives partially cleaned automatically?

                Originally posted by SheeEttin
                ...
                You can download the package to the archives with "sudo apt-get --download-only package".
                OK, so 1st trial:

                yair@yair-home:~$ sudo apt-get --download-only synaptic
                E: Invalid operation synaptic

                2nd trial:

                yair@yair-home:~$ sudo apt-get --download-only install synaptic
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                synaptic is already the newest version.
                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

                But:

                yair@yair-home:~$ ls -l /var/cache/apt/archives|grep synaptic
                yair@yair-home:~$

                So it's not there.

                Was it downloaded again?
                Is it somewhere else?


                Comment


                  #9
                  Re: Is /var/cache/apt/archives partially cleaned automatically?

                  You apparently have synaptic installed on your system, but the package is no longer present.

                  The command is checking to see if synaptic is installed (it is) and checking to see if the version is older than what would be fetched. In this case, they match, so the package isn't being downloaded. That's how I'm interpreting the output message.

                  You could try the following command:
                  Code:
                  sudo apt-get --download-only --force-yes install synaptic
                  --force-yes option:
                  Code:
                     --force-yes
                       Force yes; [b]This is a dangerous option[/b] that will cause apt to
                       continue without prompting if it is doing something potentially
                       harmful. It should not be used except in very special situations.
                       Using force-yes can potentially destroy your system! Configuration
                       Item: APT::Get::force-yes.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: Is /var/cache/apt/archives partially cleaned automatically?

                    Originally posted by Snowhog
                    You apparently have synaptic installed on your system, but the package is no longer present.

                    The command is checking to see if synaptic is installed (it is) and checking to see if the version is older than what would be fetched. In this case, they match, so the package isn't being downloaded. That's how I'm interpreting the output message.

                    You could try the following command:
                    Code:
                    sudo apt-get --download-only --force-yes install synaptic
                    --force-yes option:
                    Code:
                       --force-yes
                         Force yes; [b]This is a dangerous option[/b] that will cause apt to
                         continue without prompting if it is doing something potentially
                         harmful. It should not be used except in very special situations.
                         Using force-yes can potentially destroy your system! Configuration
                         Item: APT::Get::force-yes.
                    --force-yes doesn't work. What you want is:

                    Code:
                    sudo apt-get --download-only --reinstall install synaptic
                    The --reinstall option will allow the downloading even if it's the version on your system. Without --download-only it would of course reinstall the package.
                    I am running Ubuntu 8.10 (yes Gnome) with upgrades applied daily about 0900 UK time. Hardware is Dell Precision 420, 2x 800 MHz PIII, 512 MB RDRAM, nVidia GeForce 6800 128 MB AGP graphics, 18GB SCSI and 500GB IDE HDDs, DVD burner, Hauppage TV card.

                    Comment


                      #11
                      Re: Is /var/cache/apt/archives partially cleaned automatically?

                      Originally posted by cantab

                      --force-yes doesn't work. What you want is:

                      Code:
                      sudo apt-get --download-only --reinstall install synaptic
                      The --reinstall option will allow the downloading even if it's the version on your system. Without --download-only it would of course reinstall the package.
                      That one worked.

                      Thanks.

                      Comment


                        #12
                        Re: Is /var/cache/apt/archives partially cleaned automatically?

                        Well, it turns out that dependencies are not downloaded into /var/cache/apt/archives.

                        How do I force all dependencies to be redownloaded?

                        Comment


                          #13
                          Re: Is /var/cache/apt/archives partially cleaned automatically?

                          Do the same thing for dependencies. "apt-cache show package | grep Depends" will show the dependencies.
                          Be aware, however, that some packages may depend on other packages, which in turn depend on others... It can easily get very large.
                          I don't recommend getting packages that way, though... that way lies madness.
                          For external use only.

                          Comment


                            #14
                            Re: Is /var/cache/apt/archives partially cleaned automatically?

                            Originally posted by SheeEttin
                            Do the same thing for dependencies. "apt-cache show package | grep Depends" will show the dependencies....
                            That's too much of "a lot of easy work" and misses the whole idea of using APTonCD to easilly transfer installed packages to another PC with no Internet.

                            Any other way?

                            Comment


                              #15
                              Re: Is /var/cache/apt/archives partially cleaned automatically?

                              Synaptic allows you to generate a package installation script, based on the packages you've selected to be modified... I'm not familiar with it, though.

                              Other than that... Sorry. I don't know of another way.
                              For external use only.

                              Comment

                              Working...
                              X