Score:0

I want to list all installed non-transitive packages, how should I do it?

in flag

In apt/aptitude, many packages are not supposed to be installed manually, as they break the ability for the system to be upgraded further for causing conflict. These packages are regard as "transitive packages" that are only installed when another package depends on them are installed.

I want to see a list of installed package, which excludes all these transitive packages. How would I do this?

tribbloid avatar
in flag
diff installation
Score:1
cn flag

Apt is designed so you don't need a list of every (non-transitive) package.

For a different installation with the same applications, you need only the small list of top-level packages in the dependency chain -- the packages that are not dependencies. Most users find this much-smaller list to be easier to manage.

One fairly easy way to accomplish this using 22.10 Desktop as an example:

  1. List the set of packages apt-marked manual.
sudo apt-mark listmanual > listmanual
  1. List the set of packages that are included with a stock install of Ubuntu. Awk is used to remove additional fields and preserve only the package names.
wget -O - http://releases.ubuntu.com/releases/22.10/ubuntu-22.10-desktop-amd64.manifest | awk '{print $1}' > manifest
  1. Remove any packages in #2 from #1.
comm -2 -3 manual manifest
  1. Review your comm output, which should be short enough to be manageable. Do not include random libraries, dependencies, metapackages, no-longer-used applications, old mistakes, and other obvious unwanteds.

Your final reviewed package list are the packages you want to install on the newly-installed system.

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.