[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question on 'dpkg --get-selections'




On 9/12/20 12:29 AM, Sven Joachim wrote:
On 2020-09-11 22:03 -0700, Marc Shapiro wrote:

Is there any option to have 'dpkg --get-selections' NOT include
automatically installed packages?
No, dpkg has no notion of automatically installed packages, that is an
apt concept.

Otherwise, all packages show as manually installed, including those
that would otherwise have been automatically installed.
You can obtain a list of automatically installed packages with
apt-mark(1):

$ apt-mark showauto > automatically-installed-packages

Then, on the replicated system where you presumably had used
"dpkg --set-selections" to install the same set of packages:

# apt-mark auto $(cat automatically-installed-packages)

HTH,
     Sven

Thank you.  That is a perfectly acceptable solution to the issue.

Marc


Reply to: