An expungement can be denied in Pennsylvania, an expungement can be denied for various reasons. When a person is eligible for an expungement and there's very nuanced considerations in terms of when a person would be eligible. To put it simply, a misdemeanor or a felony offense, a person would only be eligible if a person is 70 years of age and other conditions are met or if the person is deceased and other conditions are met. With respect to a summary offense, a person would become eligible if five years have passed and a person has remained arrest and prosecution free.
If a person is eligible, the district attorney's office and potentially others, but most importantly, the district attorney's office would always have the right to object to the expungement. As to whether or not they object, it would depend on the case involved in other aspects of the matter. An experienced criminal defense attorney in Pennsylvania would be able to let you know the likelihood of a district attorney's office in terms of the likelihood of them objecting to the request for relief or consenting to the request of relief.
Ultimately, an expungement can be denied. It could be because there's some kind of procedural defect or error in the pleadings or the process potentially, or because the district attorney's office objects and say the judge were to make the final determination and were to deny the expungement. Although with the help of an experienced Pennsylvania criminal defense attorney, they can make certain that the expungement process goes as smoothly as possible and they should be involved from as early as possible in the process to help you get your record cleared up.