Fentanyl can stay in urine for up to 72 hours after last use. The length of time that Fentanyl stays in your system depends on a number of factors, including how much you have taken, how often you have taken it, and your metabolism. You can stop taking Fentanyl for at least 72 hours before the test, or you can try to flush it out of your system with detox products. However, the best way to avoid failing a drug test is to not take Fentanyl in the first place.