create function to remove widgets uninstall packages

Created function to remove widgets uninstall packages to avoid errors require files.