Yes, you can "sweep up" places (like rooms) as well as objects (like dust). Both phrasings mean to remove dirt, dust, junk, or other unwanted items with a broom (or, in an extended sense, with a vacuum cleaner). If you specify only the place, then the objects are left to implication; if you specify only the objects, then the place is left to implication. For example:
The dining-room floor is dirty. You'd better sweep it up before the guests arrive.
You had better sweep up all these thumb-tacks before the dancers arrive.
You had better sweep up before the dancers arrive.
The first example means to use a broom to clean up whatever is on the dining-room floor. The second example specifically means to remove the thumb-tacks from the floor, suggesting that a broom might be a good tool for removing them. The third example, specifying neither a place or an object, suggests that the floor is just a little too dirty for the event involving the dancers.
"sweep up" vs. "sweep out"
As usual in English, there is no precise rule to memorize. Instead, if you understand, through examples, how each phrase directs a listener's attention or imagination, you can get a feeling for when one phrase or the other is clearest or most appropriate. To understand how the phrases direct imagination, it helps to start with the individual words.
The word sweep primarily means horizontal motion along a surface, especially a motion that pushes or drags objects along that surface in the direction of the motion. The motion of a broom does this, but other things can sweep, too. For example:
In 1900, a deadly storm swept across the Gulf of Mexico, battering the island city of Galveston. [Source: Hurricanes by Dean Galliano (2000).]
The northern edge of East Pomerania, formerly part of Germany but now in Poland, is a windswept plain along the Baltic coast where trees and wooden houses are bent by the wind and where winters are icy cold. [Source: The Collected Sermons of Dietrich Bonhoeffer, ed. Isabel Best (2012).]
The word up in sweep up suggests upward motion of the objects that are dragged along with the motion, as well as thoroughness but not necessarily completeness, analogous to its use in phrases like pick up (to mean cleaning or organizing), clean up, mop up, straighten up, etc. The dirt or objects to be removed are typically on the floor (when sweeping up) or on desks or tables (when straightening up) and move upward during the process of being removed or put in their proper places. Since completeness is not implied, this sentence makes sense:
I swept up, so the dining room is a little cleaner now, but I'll need to sweep more thoroughly after dinner.
The word out in sweep out suggests that the dragged objects exit the place. So, sweep out more clearly suggests that that when the sweeping is complete, the place will be empty of the objects to be removed. Analogous to clean out vs. clean up, sweep out more strongly suggests thoroughness, completion, and especially removal.
Sweep out all of the debris from the bottom of the cage and shelves. [Source: Find Out about Ferrets: The Complete Guide to Turning Your Ferret Into the Happiest, Best-Behaved and Healthiest Pet in the World! by Colin Patterson (2006).]
This wording emphasizes removing all of the debris. The author could have said "sweep up all of the debris"; that would also be correct grammar, but it wouldn't suggest as clearly that the cage and shelves should be empty when the sweeping is done.
Now you can probably see that when sweep up makes sense, usually sweep out also makes sense, though with a different emphasis. To finish, then, you should see some examples where only one of these phrases can work:
Every morning, you should sweep up the sidewalk before you open the store.
The phrase sweep out doesn't make much sense here, because we don't normally think of the sidewalk as enclosing space that can be full or empty, or from which things can exit. But you can sweep off a sidewalk, or sweep dirt off a sidewalk: slide things off a surface by sweeping.
There was a sense in early 1918 that the titanic struggle might sweep up many more [people] before the war was over. [Source: Life, Death, and Growing Up on the Western Front by Anthony Fletcher (2013).]
The "titanic struggle" is World War I. This sentence leads you to imagine the war as something like a storm or the wind, but picking people up and dragging them into the war. The phrase swept out would be wrong here because the the intended meaning is not that people will be removed, but that they will become involved.
The afternoon rain swept out the pollen, and I stopped itching.
Here, the intended meaning is that the rain removed the pollen from the air. It's OK that the motion of the rain is downward rather than horizontal. Sweep directs the listener's attention to the fact that as raindrops fall through the air, pollen sticks to them, so the air drags the pollen to the ground. Here, the phrase swept up would be poor, because that would suggest that the pollen moves "up" the way dust is shaken up as a broom sweeps. The intended meaning is that as the rain moves down, it removes the pollen, leaving the air clean (or at least empty of pollen).