I do this job using aptitude instead apt: /usr/bin/aptitude search '~i !~M' -F '%p' --disable-columns
Toni Mas Missatge de Sven Joachim <svenj...@gmx.de> del dia ds., 12 de set. 2020 a les 9:29: > > 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 >