FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-09-2009, 10:56 AM
Robert Parker
 
Default Using /var/cache/apt

A friend is moving his Ubuntu install from a usb stick to a dedicated
partition on his hard drive. He wants to avoiding downloading all of
the updates into the new installation.

How to reuse the packages in /var/archives/apt?

He will naturally be making a backup copy of /var as well as /home
before starting off.

Thanks,
Bob Parker
--
In a world without walls who needs Windows (or Gates)? Try Linux instead!

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-09-2009, 12:30 PM
"Dake K. Odzangba"
 
Default Using /var/cache/apt

On Monday 09 February 2009 11:56:48 Robert Parker wrote:

> A friend is moving his Ubuntu install from a usb stick to a dedicated

> partition on his hard drive. He wants to avoiding downloading all of

> the updates into the new installation.

>

> How to reuse the packages in /var/archives/apt?

>

> He will naturally be making a backup copy of /var as well as /home

> before starting off.

>

> Thanks,

> Bob Parker

> --

> In a world without walls who needs Windows (or Gates)? Try Linux instead!



1. Make sure build-essential is installed (you only need dpkg-dev but...)

2. Copy the deb files in /var/cache/apt/archives to a folder of your choice

3. cd into that folder and do:

sudo dpkg-scanpackages . /dev/null | gizp -9c > Packages.gz

4. On the new system, edit /etc/apt/sources.list and include something close to this:

deb file:<backed_up_apt_folder>/ /

So if the downloaded deb packages are in /home/robert/repo, the line will look like

deb file:/home/robert/repo/ /

5. Update the package index like so:

sudo apttitude update

6 Remember to repeat #3 evrytime new debs are added to the repo folder



For more information, visit:

http://odzangba.wordpress.com/2006/10/13/how-to-build-local-apt-repositories/

--

Odzangba,

Blog: http://odzangba.wordpress.com

Registered Linux User #431909

Registered Linux Machines: #337242 #363374 #392526
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-09-2009, 01:26 PM
Nigel Henry
 
Default Using /var/cache/apt

On Monday 09 February 2009 12:56, Robert Parker wrote:
> A friend is moving his Ubuntu install from a usb stick to a dedicated
> partition on his hard drive. He wants to avoiding downloading all of
> the updates into the new installation.
>
> How to reuse the packages in /var/archives/apt?
>
> He will naturally be making a backup copy of /var as well as /home
> before starting off.
>
> Thanks,
> Bob Parker

Hi Bob.

In my case I have a FAT32 partition on another harddrive where I save the
archives from various distros, and that partition is accessable from all the
distros that are on that machine. I simply click on the desktop icon for the
Fat32 partition, open the directory for the distro where I want to save the
archives, then I'm ready to go.

Next open Nautilus on Gnome, and navigate to /var/cache/apt. Right click on
the archives directory, click copy, then paste the directory into the open
directory on the FAT32 partition (which doesn't need root permissions to
paste to). During the paste process you'll get a pop-up "can't copy the lock
file", just press skip, and the paste will proceed to completion.

Going the other way, from the FAT32 partition to the distro where you want to
copy the archives to, you'll need write permissions to write
to /var/cache/apt. With Gnome that I don't use much, sudo nautilus in a
terminal, navigate to /var/cache/apt, click copy on the archives directory in
the FAT32 partition, and paste into /var/cache/apt directory in the open root
accessable Nautilus. You'll be asked what you want to do, so click "merge
all", if your in Gnome, or if in KDE "overwrite all", then the paste will
proceed.

Of course you'll need access to both locations, and make sure that when you
paste, that it's into the /var/cache/apt directory, not
into /var/cache/apt/archives, otherwise you'll end up with an archives
directory within the existing archives directory.

Anyway, that's how i do it with gui apps.

All the best.

Nigel.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org