If you, and only you, own the copyrights on a piece of code, then you can do with that code whatever you like. For the choices that you have, it makes very little difference if you have, at some time in the past, released the code to the public under a FLOSS license.
The condition that you must solely own the copyrights means that you can not have any contributions from others in the code (unless they legally signed over their copyrights to you).
The restrictions that limit your options are that once you have released a version to the public under a FLOSS license, you can not retract that version, nor can you restrict people that have that version from exercising the rights they received under the FLOSS license.
You are free, however, to bring out a new version under a completely different license, even a closed-source license.
Something that you also see in practice is dual-licensing.
With dual-licensing, a program (or more often a library), is released under multiple licenses and the recipient can choose which license terms they want to conform to.
A common combination of dual-licenses is GPL and a closed-source license. The GPL version can then be used in open-source projects, while people that want to use the code in a closed-source project can buy the closed-source license.