I am a super paranoid person that believes FBI and etc
is spying on me, as a result i have decided to re-install
centos-linux to my pc every week.

Installing centos minimal edition via usb is simple
because the iso file is only below 400 mb and thus
i would have no trouble creating a centos usb drive
if i was in another country with slow or no internet.

the problem here is this.. this line

yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"

i have no idea how to, download all these to a folder, and then use the folder to install them all after a fresh install of centos linux minimal.

i have so far found out that one can run..

 yum groupinfo "Desktop"
 yum groupinfo "Desktop Platform"
 yum groupinfo "X Window System"
 yum groupinfo "Fonts"

to get the name of each package from every one of those "categories"

but it it gets confusing.

they have "optional packages" and "Default packages" on top of "mandatory packages".

this makes it confusing, to know which ones i should download to a folder via..

 yumdownloader --resolve <package name>

it's also time consuming to go through each one and download it via yumdownloader

how can i download all these to a folder and next time i re-install centos linux minimal, i can just run something like..

yum --nogpgcheck localinstall *.rpm

and they'd all be installed for me?

so that i don't have to run

yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"

and download everything again from the internet for every and each time i am re-installing centos minimal + gui.

one may say, create centos usb drive with the large dvd iso files so repos are all in there.

that is what i may do if i can not find a solution.

the idea here is to have what is needed rather than to have everything in a usb that is never needed.

it's nice to be organized.

  • side note, but wouldn't reinstalling in this way make you less safe, not more? the reason is that regular package installs/downloads are verified with GPG, but this way is not (although I'm not an expert in yum behavior). – strugee Sep 5 '13 at 3:34
  • @strugee, at some point there is simply this debate going on about how one should behave, constantly downloading it to install it does not make sense if downloading slows things down, and it is also a form of a query into another location, which means there will be observers, and it also is waste of "resources" and "time". so if something can be installed from a usb 400 times in the next 5 years, that's 400 times a-lot of things. – User3432423423 Sep 5 '13 at 3:54
  • my point was that even though installing it from the USB is more sparing of bandwidth etc., you would never know if the packages on the USB were compromised, whereas you would if you downloaded them from the yum repos because of GPG signing. – strugee Sep 5 '13 at 4:13
  • @strugee, i actually wasn't thinking about packages being comprimised at all but that's an interesting thought, just re-installing centos permits one to know how the real world works if they were to install centos or any linux distro, it's like being "in sync" and etc. which means the distro is unlikely to be slow or contain spyware etc due to installation and tests of packages from yum and so on, sometimes i just download bunch of things to see how they work, uninstalling is not simple, as they leave reminents behind, but also i re-install often to see how quickly i am able to get backontrack – User3432423423 Sep 5 '13 at 4:20
  • any good package manager will allow you to get rid of those remnants. the only thing you'd have to do is look at hidden files in ~ and maybe $XDG_CONFIG_HOME. any maybe, maybe, dconf - and those won't affect you even if you don't remove them. as for being "in sync", I don't understand how this is different from upgrading all your packages. – strugee Sep 5 '13 at 5:13

There are probably several ways to do this, but an easy one is to set the yum option to keep the downloaded files after installation, and then copy the files out of the yum cache after doing a trial install.

If you feel you can trust files you've downloaded and kept, though, you might want to look at snapshotting your entire drive and restoring that snapshot instead of messing with RPMs. Or create a custom liveusb image and run from that.


I understand this is not strictly answering the question about downloading yum packages, but reading your primary objective, and if you are on a systemd system with LVM, I would think about lvm snapshots, as described here and in many other sites. Once mastered, you could easily revert back to a clean system every time you want in minutes, allows snapshot's update with the newest packages, keeping your custom config files/alias/services/whatever without reconfig all or dealing with a huge kickstart file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.