Ubuntu – How to completely remove Mod Pagespeed from Ubuntu 16.04

apache-2.2mod-pagespeedUbuntu

I have previously installed mod pagespeed on my apache2 but because it doesn't feels like the way I want it.. website ends up slower than I want it to be, I end up remove it using apt-get autoremove.

However, I notice that the following are still being added to the end of each and every of my webpages.

I have restarted apache2 and restarted server and it's still the same. How do I remove it because now that mod page speed is no longer installed, the script below returns 404 error.

<script type="text/javascript" src="/pagespeed_static/js_defer.tRzI7EHUpg.js">

Best Answer

  1. Disable the module:
 a2dismod pagespeed 
  1. Restart Apache:
service apache2 restart
  1. Remove the package:
apt purge mod-pagespeed-stable