Clean up your act.
In the early days of stage comedy, sometimes a performer would use humor that was socially unacceptable or inappropriate. That performer would be told ‘clean up your act’ if he wanted to keep his job. Today, the sentence is said to persons who need to change their behavior, or who literally must clean something that is messy.