Disabling USB Supplying for an Arduino UNO

There is a solution to my problem cannot explain you why would it be a solution but would it be a way or a function that returns me if the power is taken from USB or external?