Score:0

How to replicate the list of installed packages on another installation

pm flag

I'm actually trying to diagnose a partly-broken system -- several symptoms have recently arisen. Odd combinations -- Ctl-Alt-F1 no longer works, my web page is down, I can no longer mount FAT thumb drives, some files are temporarily unavailable (produce errors) then become available again. I suspect configuration files, software, hardware, or a curse. In other words, I have no clue.

What I want to do is replicate the system in a sanitary way -- not by copying (which might copy the cause) but by rebuilding.

So, I can get a list of installed packages with apt list, or dpkg-query, but don't immediately see a way to use that list to bring my copy up to the level of the original.

How can I do that? Especially, is there a simple way to use the list to get the packages installed. The tools I know about generate a list that is not immediately useful for input to apt or similar programs. Note that the usual simple reinstall from a thumb drive is not available because of the presence of other OS partitions, including Windows.

guiverc avatar
cn flag
Providing details as to your software stack is always helpful, you tagged Xubuntu which helps (eg. we know it's a desktop Ubuntu system), but didn't provide the release detail. You can re-install a Ubuntu Desktop system non-destructively, which will fix most package problems, without touching your user files & having your *manually installed* packages auto-reinstall (where from Ubuntu repositories), that won't touch your configs (*thus if your issue is a config issue, it'll remain, but you concentrate on packages & it'll help there*), so it maybe an option for your *unstated* release.
ForDummies avatar
pm flag
I'm on Xubuntu 20.04.5. I don't know how to do that non-destructive install, and I'm a bit leery of doing it anyway. I like my idea of building a clean copy of what it should be, so I want to know a good way to install all the packages listed by apt or dpkg.
ForDummies avatar
pm flag
I already know how to get the list. What I need is a way to use it to install those packages on another system.
user535733 avatar
cn flag
"*I can get a list of installed packages with apt list, or dpkg-query*" such a list would seem to be very long...and therefore useless. Your final list should be a very short list to add to a fresh stock Ubuntu install.
guiverc avatar
cn flag
FYI: I'd likely just *clone* or copy your files across to another box/install, then re-install the system & if it's package related I'd expect the issue to be resolved. As installs are fast, the copy/clone process is the slowest step. I can re-install an OS within 15 minutes, and that's using a core2 era PC with *spinning rust* drive (*download time & quantity of packages to re-install not found on your ISO/media also takes time; faster if using a modern PC & SSD too*). If it doesn't work; you can always *clean* install as the original install wasn't touched.
ForDummies avatar
pm flag
It is also not obvious how to do a "reinstall" with the usual installer because the system has other OS partitions including Windows -- which prevents the "reinstall" option from showing up.
ForDummies avatar
pm flag
The admins insist this question is a duplicate. I disagree, but give up. I'd like to point out a different discussion I found on AskUbuntu, which goes into some things much more helpful than the supposed answer here. See `https://askubuntu.com/questions/2389`. I'll be asking a very similar question over there....
guiverc avatar
cn flag
To do a *repair* or *non-destructive* re-install, I'll provide https://askubuntu.com/questions/446102/how-to-reinstall-ubuntu-in-the-easiest-way/1451533#1451533 though there are also many other questions with that same detail...
ForDummies avatar
pm flag
@guiverc thanks. That will get me part-way there -- the diagnostic part. I also want what the title suggested -- a way to replicate the suite in installed packages from one machine to another. For two reasons: 1) it may help in diagnosing problems in manually-installed packages which I'm not sure a reinstall would do and 2) I run a cluster of 7 similar machines and I want them to have exactly the same software. :This is hard to keep up with manually.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.