0

I am using Ubuntu 14.04.5 LTS & I am not always connected to the internet for downloading software-packages.
Suppose, for instance, I downloaded packages like VLC, Banshee etc, using synaptic package manager, and after a month or so I have to format the system.

So here are my queries :-

  1. How to backup these 2 softwares EARLIER so I won't have to go through the pain of downloading them again?

  2. Does synaptic uses dpkg or apt-get by default? If it uses dpkg, how to change it to apt-get? Is it recommend to change it to apt-get or dpkg is good?

  3. Is there a way to ensure that after fresh installation of the Ubuntu, Synaptic only downloads the Repositories and not the Updates?

EDIT :- I KNOW THAT .deb files downloaded by Synaptic are kept at

/var/cache/apt/archives/

But you can't just randomly put any deb files there and than sew it in synaptic for installation. I've tried it.

Eg. If I have a package and all its dependencies as .deb and to install them I keep them at /var/cache/apt/archives/ and then open synaptic. But you see that software won't be visible in synaptic for installation. (won't be in search list)

I want to install backed up packages from synaptic not with sudo dpkg -i *.deb

Zanna
  • 70,465
  • All packages you see in Synaptic are from the repositories. When a package is selected for installation, it gets downloaded to /var/cache/apt/archives, unless it is already there, and isn't of an older version. So, if you copy backed up packages for VLC to /var/cache/apt/archives/, Synaptic will not download them again, but will use these same packages to install VLC. – mikewhatever Mar 11 '17 at 07:34
  • @mikewhatever Thanks that cleared bit of my doubts. PS:- Can you tell me WHAT NOT TO DO to ensure that the downloaded cache packages are not Removed from the system ? I've heard that they can ne removed by Synaptic or Using some terminal command. – Vivek Panwar Mar 11 '17 at 07:46

2 Answers2

0
  1. The packages you downloaded are stored /var/cache/apt/archives/, you can back up this folder. Operation apt clean should clear it.
  2. apt-get and dpkg are tools with different purposes. You can not compare them because you need both. So, this question makes no sense.
  3. Again, it is not clear what do you mean. Please explain.
0

When you copy backed up .deb files to /var/cache/apt/archives, you will have to do it as root user. After you copy, click reload in the synaptic package manager window and also wait till the search index is fully rebuilt. Then synaptic will show you the files and you will be able to install them, provided they are of the latest versions as known to synaptic. If they are not of the latest versions, then synaptic will only try to download them again. You can also try force version option from the package menu. For information regarding that look here: How_to_force_the_installation_of_a_package_version

Also, if you want linux to not delete the packages automatically, then you must have adequate space in the partition. Also, you may copy out deb files to another place now and then, so even if they get deleted you can use the backup copies.

Ddm
  • 33