Score:0

Get a list of packages installed additionally after Ubuntu installation

cn flag

I know I can get a list of all installed packages with apt list --installed.

How can I get a list of packages that were additionally installed after the installation?

Background: I want to automate the installation of a Ubuntu 20.04.4 via ansible and would like to have the subsequently installed packages from a system.

pl flag
One start would be to do a clean install to get the baseline, then on a system you want to analyze, `grep "status installed" /var/log/dpkg.log` to get some of the data you need. If the system has existed for a while, you may need to grep more, older dpkg logs. Alternatively you could diff the output of `dpkg -l` on the vanilla install vs the one you want to check.
Cyrus avatar
cn flag
@popey: That would be a possibility. I appreciate your input.
Score:1
cc flag

You have the initial installation packages in /var/log/installer/initial-status.gz, so the below script should show the additional ones you added without the (uninteresting) ones added via update:

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
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.