Ugh is defined as a way to express disgust or horror.(interjection)
When you walk into a room that is absolutely filthy and dirty, this is an example of when you might say "ugh."
See ugh in Webster's New World College Dictionary
See ugh in American Heritage Dictionary 4
Learn more about ugh