<PAGE>
 
                                                                   EXHIBIT 10.45

                     SECOND AMENDMENT TO CREDIT AGREEMENT
                     ------------------------------------

     This Second Amendment to Credit Agreement (the "Amendment") is made and
entered into effective for all purposes and in all respects as of the 15th day
of January, 1997, by and among PEERLESS GROUP, INC., a Delaware corporation
("PGI"), as successor-in-interest to TPG  Holdings, Inc., PEERLESS DATA
SERVICES, INC., a Texas corporation ("PDS"), PEERLESS SYSTEMS, INC., a Texas
corporation ("Peerless"), PEERLESS SYSTEMS CU SERVICES, INC., a Texas
corporation ("CU"), PEERLESS RECOVERY SERVICES, INC.,  a Nevada corporation
("PRS") (hereinafter collectively referred to as the "Companies"), and STATE
STREET BANK AND TRUST COMPANY, a Massachusetts trust company (the "Bank").

                             W I T N E S S E T H:

     WHEREAS, TPG Holdings, Inc. ("TPG"), Peerless, CU and PRS entered into a
Credit Agreement with the Bank dated as of October 12, 1995 (as amended,
modified or restated through the date hereof, the "Credit Agreement") whereby
the Bank established a credit facility under which Peerless, CU and PRS have the
ability to borrow funds from the Bank for working capital purposes; and

     WHEREAS, TPG, Peerless, CU, PRS and the Bank entered into a Consent and
Agreement dated as of June 17, 1996 (the "Consent") pursuant to which certain
terms of the Credit Agreement were modified; and

     WHEREAS, PGI, PDS, Peerless, CU, PRS and the Bank entered into a First
Amendment to Credit Agreement (the "First Amendment") dated as of August 20,
1996 pursuant to which (i) PGI succeeded TPG as a party to the Original Credit
Agreement as a result of the merger of TPG with and into PGI, (ii) PDS became a
"Borrower" under the Credit Agreement along with Peerless, CU and PRS and (iii)
certain terms of the Credit Agreement were modified; and

     WHEREAS, the Companies have requested that the Bank agree to (i) increase
the amount of capital expenditures which may be incurred by the Companies during
fiscal year 1997, (ii) extend the Maturity Date of the Revolving Credit and
(iii) reduce the interest rate on Revolving Credit Advances.

     NOW, THEREFORE, for good and valuable consideration, the receipt and
sufficiency of which is hereby acknowledged, the Companies do hereby agree with
the Bank as follows:

     1.   Section 2.01(a) of the Credit Agreement is hereby amended by deleting
Section 2.01(a) in its entirety and substituting therefor the following:

     "(a) General Terms.  Subject to the terms and conditions hereof and
          -------------                                                 
     provided that no Event of Default, or event which with the passage of time,
     the giving of notice, or both, would constitute an Event of Default, has
     occurred or is continuing, the Borrowers may, from time to time from the
     date hereof up to February 1, 1999, (the "Maturity Date") borrow and re-
     borrow from the Bank, and the Bank shall advance funds to the Borrowers as
     requested "Revolving Credit Advances"); provided, however, that the
                                            --------  -------          
     aggregate of (i) all outstanding Revolving Credit Advances, and (ii) the
     face amount of all outstanding Letters of Credit shall not exceed the
     maximum for the application period set forth below (the "Maximum Revolving
     Credit").
<PAGE>
 
                                      Outstanding Revolving

     Period                              Credit Advances
     ------                              ---------------
     Closing Date to Maturity Date             $2,500,000

     2.   Section 2.01(d) of the Credit Agreement is hereby amended by deleting
Section 2.01(d) in its entirety and substituting therefor the following:

          "(d) Interest.  Revolving Credit Advances made by the Bank shall bear
               --------                                                        
     interest prior to the occurrence of an Event of Default (computed on the
     basis of actual number of days elapsed over a 360-day year) on the unpaid
     principal balance outstanding from time to time at a fluctuating rate per
     annum equal to the aggregate of (i) the Prime Rate, plus (ii) one half
     percent (___%). From and after the occurrence of an Event of Default or
     maturity (whether by demand, acceleration or otherwise), the unpaid
     principal balance of the Revolving Credit shall bear interest at a
     fluctuating rate per annum equal to the aggregate of (i) the Prime Rate,
     plus (ii) five percent (5%). Interest shall be payable monthly in arrears
     on the first Banking Day of each month commencing November 1, 1995. The
     effective rate of interest shall change on each date on which the Prime
     Rate shall change."

     3.   Section 5.08 of the Credit Agreement is hereby amended by deleting
Section 5.08 in its entirety and substituting therefor the following:

          "The Companies will promptly advise the Bank of any change which
     constitutes or, after notice or lapse of time or both, would constitute an
     Event of Default as defined in Article VI of this Agreement, or a default
     in the performance by the Companies under any covenant or agreement
     contained in any other agreement to which any of them is a party or by
     which it is bound which has not been cured within the applicable grace
     period, if any. The Companies will also promptly give notice to the Bank of
     each waiver, consent or amendment granted or made with respect to borrowed
     money in excess of $50,000."

     4.   Section 5.10(f) of the Credit Agreement is hereby amended by deleting
Section 5.10(f) in its entirety and substituting therefor the following:

          "(f) Indebtedness in respect of final judgments for the payment of
     money not in excess of $50,000 in the aggregate at any time outstanding
     (excluding sums covered by insurance) remaining unsatisfied and in effect
     for any period of less than sixty (60) days or in respect of which a stay
     of execution shall have been obtained pending an appeal or proceeding for
     review;"

     5.   Section 5.15 of the Credit Agreement is hereby amended by deleting
Section 5.15 in its entirety and substituting therefor the following:

          "None of the Companies or any of their Subsidiaries will enter into
     any transaction with any person or entity affiliated with any other
     Company, or any
<PAGE>
 
     Subsidiary or any person who directly or indirectly through one or more
     intermediaries controls or is controlled by or under common control with
     any Company, except on terms no less favorable to such Company than would
     be available in a bona fide arm's length transaction with a non-affiliated
     person or entity, and provided that such Company shall have obtained the
     Bank's prior written consent to any such transaction or series of related
     transactions involving an amount of $50,000 or more. None of the Companies
     shall make any payments to its employees whether in the form of salary,
     incentive compensation, bonuses or other benefits except in the ordinary
     course of business consistent with past practices."

     6.   Section 5.20(b) of the Credit Agreement is hereby amended by deleting
Section 5.20(b) in its entirety and substituting therefor the following:

          "(b) The sum of (A)(i) the Companies' consolidated cash and Cash
     Equivalents, plus (ii) the Companies' consolidated accounts receivable,
                  ----
     minus (B) the aggregate principal amount of all Revolving Credit Advances
     and the aggregate face amount of all Letters of Credit outstanding under
     the Revolving Credit shall be greater than or equal to the following
     amounts on the following dates:

               Date             Minimum Liquidity
               ----             -----------------

        December 31, 1996           $4,000,000
        December 31, 1997           $4,000,000
        December 31, 1998           $4,000,000"

     7.   Subsection (i) of ARTICLE VI of the Credit Agreement is hereby amended
by deleting subsection (i) in its entirety and substituting therefor the
following:

          "(i)   failure by any Company to make any payment of principal or
interest beyond the period of grace contained in any instrument or agreement to
which such Company is a party or by which it may be bound evidencing any
indebtedness for money borrowed in excess of $50,000 (unless such default is the
result of a good faith dispute arising under such agreement or instrument and
the other party or parties thereto have not accelerated the maturity of such
indebtedness), or default by any Company in the performance of any other
covenant or agreement contained in any such agreement or instrument referenced
in this subparagraph which results in the acceleration of the maturity of any
indebtedness of such Company to any other party;"

     8.   Section 5.21 of the Credit Agreement is hereby amended to allow the
Companies to make or incur consolidated Capital Expenditures, without the prior
written consent of the Bank, up to the maximum aggregate amount of Two Million
Dollars ($2,000,000) during fiscal year 1997.

     9.   Contemporaneously with the execution hereof, the Borrowers are
executing and delivering to the Bank an Amended and Restated Revolving Credit
Note in substantially the form attached hereto.

     Except as amended hereby, the Credit Agreement and it terms and provisions
are hereby ratified and confirmed for all purposes and in all respects as of the
date hereof.
<PAGE>
 
     This Amendment may be executed by facsimile transmission and in one or more
counterpart copies, each of which shall be an original, but all of which taken
together shall constitute one and the same instrument.

                 [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]
<PAGE>
 
     IN WITNESS WHEREOF, the parties have caused their authorized
representatives to execute this Amendment as of the date first written above.
 
                                PEERLESS GROUP, INC.,
                                as successor-in-interest to TPG Holdings, Inc.


                                By:   /s/ GARY J. AUSTIN
                                   ---------------------------------------------
                                   Name:  Gary J. Austin
                                   Title: President


                                PEERLESS DATA SERVICES, INC.


                                By:   /s/ GARY J. AUSTIN
                                   ---------------------------------------------
                                   Name:  Gary J. Austin
                                   Title: CEO 


                                PEERLESS SYSTEMS, INC.


                                By:   /s/ GARY J. AUSTIN
                                   ---------------------------------------------
                                   Name:  Gary J. Austin
                                   Title: CEO


                                PEERLESS SYSTEMS CU SERVICES, INC.


                                By:   /s/ GARY J. AUSTIN
                                   ---------------------------------------------
                                   Name:  Gary J. Austin
                                   Title: CEO


                                PEERLESS RECOVERY SERVICES, INC.


                                By:   /s/ GARY J. AUSTIN
                                   ---------------------------------------------
                                   Name:  Gary J. Austin
                                   Title: CEO


                                STATE STREET BANK AND TRUST COMPANY
 

                                By:   /s/ MICHAEL ST. JEAN
                                   ---------------------------------------------
                                   Name:  Michael St. Jean
                                   Title: V.P.