["Apt"] > apt-move

apt-move - move cache of Debian packages into a mirror hierarchy. SYNOPSIS

apt-move [-c conffile] [-ft] command DESCRIPTION

apt-move is use to move files from an ?AptGet cache (which is stored by default in /var/cache/apt) into partial mirror of the Debian archive. It will place the packages in the mirror directory specified in the configuration file /etc/apt-move.conf, and optionally delete any obsolete files in the mirror.

I won't repeat the man page here (say man apt-move on any system with apt-move installed), but below is a sample configuration file.

    #  Configuration file for the apt-move script.
    #  You should modify the following configuration to suit your system.
    #  See the apt-move(8) manpage for information about these settings.
    #  The defaults for this file are simply the settings I currently use.
    # Configuration for apt-move script --------------------------------------
    # The sites in ``/etc/apt/sources.list'' that you wish to mirror.
    # The absolute path to your debian directory (top of your local mirror).
    # This MUST appear as the first entry of your sources.list if you use
    # sync or mirror.
    # The default distribution (see the apt-move(8) manpage for details) 
    # The package types you want to mirror. 
    # Possible values are: binary, source, and both (use only one).
    # The full (absolute) path to your local cache of package files. The default
    # will work for the apt-get packages, unless you've reconfigured apt.
    # The full (absolute) path to your local cache of Packages files.  The
    # default will work for the apt-get Packages, unless you've reconfigured apt.
    # Do you want apt-move to delete obsolete files from your mirror? (yes/no)
    # Maximum percentage of files to delete during a normal run.
    # Set this to yes if you wish to keep the originals for move/movefile.
    # Set this to 'none gzip' to get uncompressed Packages/Sources files.
    PKGCOMP='none gzip'
    # Set this to yes to make apt-move generate Contents files.
    # End Configuration 

Note that this configuration is changed from the default in only one place: DELETE has been set to yes. If you want to change the location of the mirror (destination directory), change LOCALDIR to the desired location.

Probably the quickest and most often used command in apt-move is

    apt-move update

This will update the master files (which indicate what packages are available and where packages should be stored), moves the packages into the local tree (mirror), deletes obsolete packages in the tree, and rebuilds new local Packages.gz and Sources.gz.