Is there any way to cancel it if I have cosigned on a loan?
No, you cant. Lenders won't let you cancel it. This is why you should always think 100 times before cosigning on a loan. If the primary borrower fails to repay the loan, then the lender will catch your collar. You're stuck dude. Sorry!!! Can't help you.
some loans have T&C that is a program that enable a cosigner to remove his/her name from a loan, after a certain time. It can be after a 2-year period.
You can also convince the primary borrower to refinance the loan and this time, don't cosign it. :-)
Depends on the loan term and condition. technically, the cosigner can't withdraw his/her name in the middle of the loan life. Because the lender needs a safeguard from where they can get back their money. What happened? Why are you thinking like that? For whom you have cosigned the loan?