Drugs may be excreted unchanged or as metabolites. They may be excreted in urine, (and then faeces), expired air, sweat, breast milk, etc. However, the major routes are bile and urine. The bile generally excretes water soluble metabolites that are produce the liver. The urine excretes both unchanged drugs and many metabolites.
Drugs and metabolites may be filtered by the kidney or actively secreted into the urine subsequent extent of excretion is also influenced by whether there is active reabsorpt back into the blood by a specific transport system or whether there is passive diffusion back into the blood as water and salts are reabsorbed: a factor largely determined by compounds’ lipid solubilities as they must cross the cell membranes of the renal tubular cells to reach the circulation.
The lipid solubility in turn may be influenced by the pH of the urine. For example: drugs that are acids, are more lipid-soluble at low pH (and thus have greater reabsorption and lower excretion) and drugs that are weak bases, are more lipid-soluble at high pH.