Announcement

Collapse
No announcement yet.

HOWTO: Cleaning local package archives

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

    HOWTO: Cleaning local package archives

    Apt
    apt - Advanced Package Tool. APT is a management system for software packages.

    From http://www.debian.org/doc/manuals/ap...n.html#s-clean
    3.6 Removing unused package files: apt-get clean and autoclean

    When you install a package APT retrieves the needed files from the hosts listed in /etc/apt/sources.list, stores them in a local repository (/var/cache/apt/archives/), and then proceeds with installation

    In time the local repository can grow and occupy a lot of disk space. Fortunately, APT provides tools for managing its local repository: apt-get's clean and autoclean methods.

    apt-get clean removes everything except lock files from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. Thus, if you need to reinstall a package APT should retrieve it again.

    apt-get autoclean removes only package files that can no longer be downloaded.

    Aptitude
    A highly configurable console front-end for Debian APT. Aptitude is a text-based interface to the Debian GNU/Linux package system.

    man aptitude:
    aptitude clean/autoclean

    clean
    Removes all previously downloaded .deb files from the package cache directory (usually /var/cache/apt/archives).

    autoclean
    Removes any cached packages which can no longer be downloaded. This allows you to prevent a cache from growing out of control over time without completely emptying it.

    Synaptic
    Synaptic is a graphical package management program for apt. It provides the same features as the apt-get command line utility with a GUI front-end based on Gtk+.

    Cleaning:
    Settings > Preferences > Files > Delete downloaded packages after installation and/or click Delete Cached Package Files


    Adept
    Adept is a GUI to the Advanced Packaging Tool for KDE. Adept is developed by Peter Ročkai and is sponsored by Canonical Ltd. through the Kubuntu project.

    Hmm - Is there cleaning in the adept ?


    Links

    APT HOWTO
    http://www.debian.org/doc/manuals/ap.../index.en.html

    Debian New Maintainers' Guide
    http://www.debian.org/doc/manuals/ma.../index.en.html

    Cleaning up a Ubuntu GNU/Linux system
    http://www.ubuntugeek.com/cleaning-u...in-ubuntu.html

    Synaptic Package Manager - Home
    http://www.nongnu.org/synaptic/index.html

    SynapticHowto
    https://help.ubuntu.com/community/SynapticHowto

    Adept
    http://web.mornfall.net/adept.html

    Adept Package Manager
    http://en.wikipedia.org/wiki/Adept_Package_Manager

    Ubuntu Linux Resources
    http://www.psychocats.net/ubuntu/

    aptitude versus apt-get
    http://www.psychocats.net/ubuntu/aptitude

    Topic: benefits and disadvantages of synaptic instead of adept in Kubuntu
    http://kubuntuforums.net/forums/index.php?topic=5933.0
    Before you edit, BACKUP !

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

    #2
    Re: HOWTO: Cleaning local package archives

    Autocleaning local package archives


    There is a apt script in the /etc/cron.daily/. Anacron will use it to clean local package archives.

    /etc/cron.daily/apt :
    # 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.
    .
    .
    .

    Configuration files for the apt script are in the /etc/apt/apt.conf.d/.

    As default autocleaning is disabled (Kubuntu Gutsy). /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";
    As default packages maximum/minimum age and maximum size of the cache are set, /etc/apt/apt.conf.d/20archive:
    APT::Archives::MaxAge "30";
    APT::Archives::MinAge "2";
    APT::Archives::MaxSize "500";

    Links:

    Topic: Is /var/cache/apt/archives partially cleaned automatically?
    http://kubuntuforums.net/forums/inde...opic=3089393.0

    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

    Working...
    X