I am looking for which no-longer-installed package depended on rsync. An apt-get autoremove now wants to remove rsync so I'm guessing that it was installed as part of a dependency rather than manually, and I'm curious which package depended on it.Can I search back in logs for something like X requires Y, so I will install Y as well? Or does it even store which reverse dependency required it, just like it stores that it was not installed by the user?
How to find which package required another package?
dpkg;dependencies
apt doesnt remember which reverse dependency caused it to install rsync, but it does log all its actions in /var/log/apt, so you might find the dependency there:zgrep rsync /var/log/apt/history.log*Look for a line saying that rsync was installed automatically; one of the non-automatic packages there should be the source of the installation.You can also examine rsyncs reverse dependencies, e.g. using aptitude, or apt-rdepends -r, or reverse-depends (in ubuntu-dev-tools), or grep-dctrl.Note that rsync might be a candidate for uninstallation, not because a package depending on it was uninstalled, but because whatever package caused it to be installed no longer depends on it. That is somewhat harder to trace...As pointed out by cas, you can tell apt to keep rsync, regardless of which package depends on it, by marking it as manually installed, using either apt-get install rsync (which wont actually install rsync if its already installed), or apt-mark manual rsync.