I have developed a library at my former employer.
After my employment ended, I got to take the library with me.
Does the Apache v2 prohibit renaming packages as long as I keep the license header intact?
1
You should be fine.
Here’s a copy of the (Apache v2 license](http://www.apache.org/licenses/LICENSE-2.0.html)
And this is the relevant section:
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
So the Apache v2 license explicitly grants recipients of the license copyright to the work, including the ability to create and distribute derivative works. It also grants the right to reproduce the work.
Renaming a package is closest to simply reproducing the work, so you should be fine.
If you wanted to go to an extreme, you could call renaming a package the creation of a derivative work. Which you have also been granted license to do.
Keep the notices intact, as the license instructs in Section 4.
1