Officials will return the books within five days if the bookshop proprietors ensure they are sealed before being put back on display.
Judge Raphael Baddini de Queiroz Campos from the local family tribunal acted after finding a group of children gathered around a window display at one of the town's bookshops where erotic content was on display, the Rio de Janeiro justice service's web site said.