I must build some library If only to write with Apache 2. license. There's some GPL code that's helpful, so I wish to first code the library by using their GPL code and publish the library with GPL license.

Basically later take away the GPL code and substitute it with my very own code etc., am i going to have the ability to alter the library's license to Apache 2.?

You have any code that you simply write and may license it in whatever way that you want. If you select to make use of GPL'd code and distribute the end result, you need to distribute your code underneath the same license. That does not remove your privileges for your code, however. Should you later alter the package to get rid of the GPL'd code, you are able to re-problem your code under any license. As Thilo notes, however, you cannot revoke the version of the code you first of all shipped as GPL'd. That it's still open to anybody underneath the GPL license.

Among such like may be the Squeak project. They initially shipped having a proprietary license and recently have transformed for an Durch license. To do this, they needed to obtain the signature of everybody who had led towards the project underneath the old license to accept the brand new one. Where they could not discover the proprietors (or they wouldn't sign), they needed to replace code with new stuff.