There are a few different ways to dissolve sludge in pipes. One common method is to use a chemical cleaner. This type of cleaner will usually have some sort of acid in it that will help to break down the sludge. Another option is to use a mechanical device to break up the sludge. This can be done with a plunger or some other type of tool. Finally, you can also try flushing the pipes with hot water. This can sometimes help to loosen up the sludge so that it can be flushed out more easily.