TL;DR: Running sudo apt --purge autoremove
should work to complete the uninstallation.
Use the autoremove
action to uninstall the remaining dependencies.
You've uninstalled the confluent-platform-oss-2.11
package, but this is a metapackage, which doesn't itself provide any software.1 Installing it caused several other packages to be installed, which themselves provide the software. Removing confluent-platform-oss-2.11
causes those other packages to be eligible for automatic removal, but it doesn't actually remove them. To remove them now, it should be sufficient to run:
sudo apt autoremove
Or, if you also want to remove systemwide configuration files associated with the software, you can run this command instead:
sudo apt --purge autoremove
In either case, apt
will show you what packages will be removed and ask you if you want that done.
You are still able to run the confluent
command because that command is provided by the confluent-cli
package,2 which installing confluent-platform-oss-2.11
caused to be installed. confluent-cli
is, accordingly, one of the packages that autoremove
will uninstall.
If you need (or want) to investigate further...
This section is in case you want to know more, or for the fairly infrequent situation where the autoremove
action is insufficient.
When you originally installed confluent-platform-oss-2.11
, the output of apt-get
would have included something like this:
The following additional packages will be installed:
confluent-camus confluent-cli confluent-common confluent-kafka-2.11 confluent-kafka-connect-elasticsearch
confluent-kafka-connect-hdfs confluent-kafka-connect-jdbc confluent-kafka-connect-s3
confluent-kafka-connect-storage-common confluent-kafka-rest confluent-rest-utils confluent-schema-registry
It is rare that you would have to remove those packages manually, though. Every package installed on your system is marked as manually or automatically installed. You specifically asked for confluent-platform-oss-2.11
to be installed, so it was marked as manually installed. Packages that are installed only because other packages depend on them, and that you never subsequently attempt to install by name, are marked as automatically installed. The autoremove
action (passed to apt
or apt-get
) removes automatically installed packages that are no longer depended on by any currently installed packages.
If autoremove
didn't remove everything you expected, you can try removing packages manually. First, unless you know specifically what packages were installed, you should inspect the logs to check, in case it's not the same as what I showed above. The most useful logs are usually /var/log/apt/history.log
and /var/log/apt/term.log
. You can try uninstalling packages with sudo apt remove ...
or sudo apt purge ...
(or the corresponding commands with apt-get
, if you prefer). If you do, you may be asked if you want to proceed. Look at the list of packages carefully. If autoremove
didn't work, there may be something else depending on the packages. The remove
action will remove them nonetheless, and also remove whatever depends on them!3
Notes
1 I had guessed that this was so; I then confirmed it by inspecting the output of dpkg-query -L confluent-platform-oss-2.11
on a system on which confluent-platform-oss-2.11
was installed.
2 Running type confluent
to find out where confluent
is, followed by dpkg -S /usr/bin/confluent
to find out what package provides it, reveals this.
3 The real story of dependency resolution is more complex, in general, than I've been letting on, because there is more than one strength of dependency. It is sometimes possible to install package A, causing package B to be installed automatically, then remove package B without package A having to be removed. However, in your case, the packages that remain installed were installed because the metapackage has a strict "Depends" relationship to them, and it's unlikely anything else has has declared any kind of dependency on them.