First, you’ll need to be logged in as the user that owns the packages, then run this query.
SELECT object_name, object_type FROM user_objects WHERE object_type='PACKAGE';
With the package name, you’ll then run this query to get the body of the package.
SELECT DBMS_METADATA.GET_DDL('PACKAGE','<object name>') FROM dual;
The results will be in a CLOB, and you may need to replace occurrences of “/n” with proper line feeds.