Prevention is the best thing possible but sometimes not enough. Sealing the entrance to their dwelling space and trapping them is a great option. Repellents such as peppermint or catnip oils can be placed in their areas. Rats and mice especially hate these fragrances and will leave. Traps are another option. Using poison should be a last resort.