0

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?

1
  • diff installation
    – tribbloid
    Jan 9, 2023 at 7:38

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .