1

First I install a program A, lets say openssh-client.

And, to work in my server, I would always need a program B alongside A, lets say zip, for example.

Is it possible to configure apt to set B (zip) as a "dependency" of A (openssh-client), in such a way that if I uninstall A, B will be automatically marked as auto-installed, and therefore will be removed next time apt autoremove is invoked; BUT as long as A is installed, B will not be uninstalled when running apt autoremove.

Note that I am not interested in setting B as "manually installed" because I would have to check it once A is uninstalled.

Thanks in advance.

1 Answers1

3

Yes you can. It's called a metapackage. It's essentially an empty package that pulls in all your "normal stuff" as a dependency. Look at the *ubuntu-desktop package if you need a reference guide. It doesn't really contain anything. It's just a list of things to install.

So, you'ld want a "myjunk.deb" that pulls in both openssh-client and zip. That way when you apt-get remove myjunk, it shows as openssh-client and zip are able to be removed.

muru
  • 197,895
  • 55
  • 485
  • 740
RobotHumans
  • 29,530