# Find file in installed packages
dpkg -S <file>
# List files in a package
dpkg -L <pakcage>
# Find file in all packages
apt-file search <file>
# Mark apt package as auto
sudo apt-mark auto <package>
# Remove unnecessary packages
sudo apt autoremove