t is illegal to intentionally refuse to give someone their package.

. Keeping the package would be considered theft. 

Legal status and consequences
The legality of withholding a package depends on who it is addressed to and the courier service involved. 
Packages delivered by the U.S. Postal Service (USPS)
  • Federal crime: It is a federal crime to take, hide, or keep mail delivered by the USPS that is not addressed to you.
  • Penalties: Penalties can include fines and up to five years in prison. 
Packages delivered by Amazon, UPS, FedEx, and other private carriers
  • Theft of misdelivered property: In most jurisdictions, withholding an item you know is intended for someone else can be considered theft. The value of the package determines if the charge is a misdemeanor or a felony.
  • Civil matter: The rightful owner could sue you in small claims court for the value of the property.