def METHOD_NAME(c: Connection):
    """
    Copy the dependencies in the apt cache to /tmp on the local machine.
    """
    # Build a list of package metadata were each row looks like:
    #
    #   pkg_name version deb_name
    c.run('rm -rf /tmp/packages')
    c.run('rm -rf /tmp/packages.txt')
    c.run('mkdir -p /tmp/packages')
    c.run('cp ~/magma-packages/*.deb /tmp/packages')
    packages = c.run('ls /tmp/packages')
    with c.cd('/tmp/packages'):
        for f in packages.split():
            pkg_name = c.run(
                f'dpkg -I {f}'
                ' | grep " Package:"'
                ' | awk \'{print $2}\'',
            ).strip()
            version = c.run(
                f'dpkg -I {f}'
                ' | grep " Version:"'
                ' | awk \'{print $2}\'',
            ).strip()
            c.run(
                f'echo "{pkg_name} {version} {f}" >> /tmp/packages.txt',
            )
    c.run('mkdir -p /tmp/packages/executables')
    c.run('cp ~/magma-packages/executables/* /tmp/packages/executables')
    # Tar up the packages and executables
    with c.cd('/tmp/packages'):
        c.run('tar czf /tmp/packages.tar.gz ./*.deb ./executables')
    # Pull the artifacts onto the local machine
    c.get('/tmp/packages.tar.gz', '/tmp/packages.tar.gz')
    c.get('/tmp/packages.txt', '/tmp/packages.txt')
    magma_version = get_magma_version(c)
    c.run(f'echo "{magma_version}" > /tmp/magma_version')