Delete unnecessary files and uninstall unused programs before performing disk cleanup and defragmentation. Run disk cleanup to delete temporary files and uninstall programs, check all boxes and confirm deletion. Then defragment the hard drive by selecting the drive and waiting for the process to finish to optimize file organization.