Once the old carpeting has been removed you will need to clean the underlying floor thoroughly. First vacuum it and then wash it well using suitable cleaning products for the type of material you have. Wipe it dry before starting to fix the new carpeting. [links]