apt: Find what package a binary is from

To find out the package which apache2 is from, you do:

dpkg -S `which apache2`

To remove all of apache2:

sudo apt-get remove apache2*

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.