I know this is a very generic question, but lets say i have a linux machine set up to do a certian task (ex: web server). And now i want to get rid of all of the other unessarry running processes and software packages. What is the best way to go about doing this?