Author Topic: (SOLVED) How do I Re-install packages from Hard Drive  (Read 545 times)

Offline Borlock

  • Jr. Member
  • **
  • Posts: 30
(SOLVED) How do I Re-install packages from Hard Drive
« on: September 20, 2011, 05:19:07 PM »
I don't know how to re-install packages I have downloaded with Synaptic and backed up.

I did find out how to save packages that I have downloaded from Synaptic. I open Synaptic and go to "Settings/Preferences/Files". Then I put a check mark next to "Leave all downloaded packages in the cache".

Once that is done I close Synaptic and go to "root/var/cache/apt/archives" and they are there. I then copy them to a backup medium.

I'm still quite new to Linux so getting this down was quite exiting for me. I really like to have backups of my software instead of relying on the net for any re-installs.

BUT!

The problem I'm running in to know, is how do I install them from my drive or backup medium latter on when I need them?


What I did try was, I created a temporary folder on the drive just for reinstalling any repositories (home/user/repositories).

I then went to "Synaptic/Settings/Repositories" and created a new URL with the "New" button. Then I typed in the following:


file://home/user/repositories
pclinuxos/2010
main updates nonfree kde4 games

No luck, it failed from what the little window said when it came up.


Any help would be great, thanks

Borlock
« Last Edit: September 20, 2011, 07:52:45 PM by Borlock »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10676
  • MLUs Forever!
Re: How do I Re-install packages from Hard Drive
« Reply #1 on: September 20, 2011, 05:38:53 PM »
You put the files into a folder and call it, for example,

RPMS.saved

That folder will be under  /home/user/repositories

You should now have  /home/user/repositories/RPMS.saved  and all your RPM packages in there.

Next copy and paste the following command into a terminal.
This will build the "base" folder which holds info about your files.
It will display a progress window while it is running.
OK it when finished.

Code: [Select]
(genbasedir --flat --bz2only --progress /home/user/repositories) | zenity --width=500 --progress --title "Updating the Repository Database ....." --pulsate ;

Now change the repository information in Synaptic to reflect what has been done ....

URI:              file:///home/user/
Distribution:   repositories
Section(s):     saved

Every time you add files to your repository you must run the command to rebuild the 'base' database of the contents.

I *think* that should get you going ......  

regards.
« Last Edit: September 20, 2011, 05:41:54 PM by Just18 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Borlock

  • Jr. Member
  • **
  • Posts: 30
Re: How do I Re-install packages from Hard Drive
« Reply #2 on: September 20, 2011, 07:50:31 PM »
Fantastic!

Thank you very much Just18, it worked great! I must say, I really love Linux and PCLinuxOS. So much better then that other operating system, its politics and lack of freedom. I actually enjoy learning and working with an OS now.

Thanks again

Borlock

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10676
  • MLUs Forever!
Re: How do I Re-install packages from Hard Drive
« Reply #3 on: September 21, 2011, 02:03:31 AM »
Fantastic!

Thank you very much Just18, it worked great! I must say, I really love Linux and PCLinuxOS. So much better then that other operating system, its politics and lack of freedom. I actually enjoy learning and working with an OS now.

Thanks again

Borlock

Glad it worked for you  :D

You might wish to put that command in a tiny script file that will run when clicked on ......  much easier than trying to remember the command when you add files. ;)

If you - for instance - build an rpm for yourself, you can create a second folder in your repository ....  called something like  "RPMS.mine". You put RPMs you create into that folder, run the command to update, and then in Synaptic, add "mine" to the sections line of your 'file://' entry. Your RPMs then become available through Synaptic too. ;)

Have fun!   ;D ;D

regards
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT