Between 1995 and 2004, when I was a teen, I have rented a book from the library.I think was YA fiction book which got some sort of an award. I think it was written either in 70s, 80s, or 90s. The original book was written in English.
It was either a novel or novellete length. It had a sort of Tom Sawyer feel, as in, a boy had an adventure and ended up growing as a person after having it.
It starts like this: In the prologue, a ghost or a poltergeist shows up in woman's house and starts breaking things and generally being a nuisance. I think the prologue happens in 19th or 18th century or something like that. She calls her neighbor, who is somewhat of a local handyman that fixes fences and things around the house. The handyman solves it by taunting the ghost that he can't enter the glass bottle and move it from the inside, only from the outside. A ghost responds to the taunting by entering the bottle, the handyman corks it and wires it shut. Then he gives the bottle to the woman and tells her to keep it safe and do not open it or break it under any circumstances!
A few decades or centuries pass and it is now start of the 20th century. The woman from the prologue is either very old or very dead. A new family moves into the neighborhood. A neighbor boy of that family wanders around and somehow finds the bottle. It is possible that the original owner's house is either being destroyed or renovated and he finds it in a hole in the wall. He either uncorks it or breaks it somehow and the poltergeist is on the loose again, haunting the new family's home.
Some time passes (days or weeks) and the ghost turns into a genuine nuisance. Slamming doors and windows, breaking the plates, the whole nine yards. The boy's mother calls a local handyman (different one this time, his name might have been something common, like Tom or Nick. Or it might have been the original handyman's name.) to solve it.
He remembers something his father told him how to solve the ghost problems and does the same thing with the bottle that the original handyman did. Only, the ghost breaks the bottle this time and writes on the piece of paper they are using to communicate.
"You can't trick me the same way twice."
"You can't get me the same way twice."
So the boy and the handyman have a chat if he found a glass bottle of sort and the story starts proper. They need to find out who the ghost is, what is his unfinished business and how to make it pass to the other side.
I think that one character might be Archangel Michael or Raphael in disguise, but that might be a different book. I remember the handyman and the boy going down some stairs into the darkness with the ghost guiding them or something like that.
That's all I remember. My google fu has failed me.