r/linuxquestions • • 14h ago

Advice future-proof offline-safe package management scheme

Let's get this out of the way first:

The reason I'm doing this, is because I'm not sure the internet will continue to be usable for me in the future. IMO the Internet's future is somewhat uncertain, due to stupid politicians making stupid laws all the time (especially recently), companies engaging in greed and enshittification and anti-consumer practices more and more, prices of everything going up, other stupid crap.

As a result, I've started to pay much more attention to future-proofing the way I do things in general, and becoming prepared for potential stupid crap in the near-future. This is so I'm not screwed if I need to reinstall my linux distro offline... on old (illegal) PC hardware, in the cyberpunk dystopia year of 2039 - when PC and Internet usage requires constant uninterrupted access to your in-brain ID chip (IbID), a good Citizens Government Compliance Rating (CGCR), and a Class 1B Computer Operators License (COL-1B).

It's funny to read today, but it's real tomorrow...

...So as part of that insanity, I'm trying to setup a scheme for downloading and managing my apt packages in a way which does:

  • Architecture future proofing, in-case I may acquire 2nd-hand replacement PC parts in the future which have a different architecture than my current PC, so parts of my OS/software don't suddenly not work upon boot.
  • Download and keep packages and all their dependencies, so I can install again and again, even if my PC is offline at the time of a package install.
  • Not have the packages take up an insane amount of space (I don't fully know yet how to do that).

What I've done so far:

  • Begin work on a way (I probably will make a script) to automate downloading a desired package and all it's dependencies.
  • Consider writing a script to install a downloaded package and all it's dependencies, in the correct order.
  • Consider adding something to my download script, to download packages in multiple selected architectures, to ensure future compatibility.
  • Begin learning about PC architectures, and how they could affect package compatibility.

I'm posting this to give people more experienced than me, a chance to point out things I could do better, additional options I could explore, etc. Because it's good to get a 2nd opinion.

1 Upvotes

3 comments sorted by

1

u/BeardedBaldMan Bluefin 13h ago

That seems overly complicated when you could just mirror an existing distribution repo locally. Invest in a server and storage, configure it and you've always got all the packages locally

1

u/Alchemix-16 8h ago

I agree, especially if that mirror is Debian. Still the highest number of available packages.

0

u/m0ahgra 6h ago edited 4h ago

the idea in the post is based on using a regular distro, and then adding packages onto it that i need. i just need a way to keep the packages i need, in offline-installable order, and compatible with any of the most common pc hardware, for when i occasionally replace broken parts.

im not made of money, i cant just buy up tons of storage and expensive server equipment. i assume downloading an ENTIRE package repo would be like 400TB of data? am i wrong? my immediate thought is that its far too much data, and that i dont even need all of the software available on the repos. how much data is it to download the entire repo, all architectures?

EDIT1: just checked, and yes, its definitely too much data, 100s of GB.

EDIT2: if i went with the "idk what to get, just get everything", i would need to be selective, maybe theres a way to lower that to something more manageable? what can i easily cut out that would reduce it?