FORTUNE — There’s much more to New York’s trash than meets the eye. Just ask John Doherty, commissioner of the city’s Department of Sanitation. He knows more about keeping the city clean than probably anyone else alive, having risen through the ranks within the department since starting as a sanitation worker in 1960. Now, he’s in charge of its nearly 8,000 uniformed workers and thousands of vehicles including collection trucks, street sweepers and salt spreaders.
The city has changed considerably since the 60s, and so has its refuse. There’s much less paper, Doherty says, with the popularity of e-readers and email, and you can’t ship garbage on a barge to Staten Island anymore. He talks to Fortune about jumping rats and how to keep employees motivated after a particularly daunting snowstorm.
Fortune: You’ve been at the New York Department of Sanitation for over 50 years. How did it all begin?
John Doherty: Well, I got married on a Saturday, and on Monday I had to report in for work. It snowed that Wednesday, and the next thing I knew, I was on the end of a shovel pushing snow out into the street.
After six months, the promotional exam was coming up and I said, “Well I’m going to take it.” And the guys said, “Ah, you crazy kid, you’ll never pass,” because half the mark in those days was seniority. I knew I wasn’t going to get promoted then, but I continued to take tests after that and get promotions.
But there were times that I thought about leaving.
What kept you there?
After I was on the job a year, I had my first child. I was new at the job, so I went in to work my 12 a.m. to 8 a.m. shift. We didn’t have cell phones, so they called the office and the foreman came out and said, “John, you got a baby boy.” It was about three or four in the morning. I said, “Oh. I’ll go see my wife as soon as I get done working.”
Then I said, okay, I have a wife and a child here. God knows when the rest of them are coming — there were three more after that — and I got a good, secure job and I got medical benefits for them, so I stayed.
What things do most people miss when it comes to sanitation?
It’s kind of an invisible service in many ways. There are two things that get the population’s attention. One is the streets being clean. The other one is snow removal. Last winter, unfortunately, we didn’t get the accolades that we normally get for cleaning up after a snowstorm. Regardless of what the problems were, from the public’s perspective, we didn’t do our job.
How do you move forward after that?
I think sometimes that’s a challenge, to try to get it across to the people at every level who are out there and … getting a black eye because they didn’t clean up after the storm, because in their minds, they worked hard at it.
You sit here as a manager or commissioner and they say, “Well, it wasn’t our fault,” and you say, “No, we didn’t achieve what we wanted to achieve. Next time, we have to do better and go back and learn from anything we did wrong.”
Do you ever get positive feedback?
When somebody comes to town who hasn’t been to New York for a while, they’ll remark, “Oh boy, the streets are a lot cleaner than they used to be,” say, in the 70s or something. That’s always nice to hear.
What are some of the perennial challenges in sanitation?
Everybody wants your service, but not your garage or disposal facility. It’s a perception problem. Fresh Kills was New York’s last landfill. It opened in 1946 and we had the last barge in 2000. The landfill grew, and the population on Staten Island grew, and they bumped against each other. When that happens, somebody’s going to win, and it’s usually not the landfill. So we had to start a whole new system of getting rid of garbage outside of the city.
Now, we’re hauling waste from New York City as far south as the Carolinas or Georgia. That transportation model starts to back up if anything breaks down. We’ve figured out ways to get around it, but that’s another change in the experience.
Has the perception of the job changed since you worked out in the field?
When I had to go sweep the street in front of the bank in lower Broadway, I pulled a hat over my head. I was very embarrassed. But years later, when I’d be overseeing a parade cleanup … I was pretty proud of it. So things changed for me in my personal life, but also in the department. Sanitation workers never used to go back and forth in our uniforms, but today, everybody does. They’ll wear their shirts to go into a store after work, they’re proud of their job.
Any war stories?
The rat that bounced off my chest is interesting. In the old trucks, we had this escalator thing, so rats would spin right out. If you were short, you and the rats would be looking eyeball to eyeball with each other, but they’d hit me in the chest. Oh yeah, they’d jump out at you. I chased one of them with a garbage can but I didn’t get him. I was pissed, I didn’t get him.