The main purpose of this legislation is to repeal the Alien Enemies Act, which has been in place for many years. The objective is to eliminate a law that allows the government to detain or restrict the rights of individuals from countries that are considered enemies of the United States during times of war. This repeal is part of a broader effort to promote a more inclusive and fair approach to immigration and national security. The key provision of this legislation is the outright repeal of specific sections of the U.S. Code that outline the Alien Enemies Act.