Jack Eckerd Corp., the nation's second-largest drugstore chain, announced yesterday it would sell 55 department stores, as part of an effort to unload other assets to concentrate on the drugstore business.

Analysts said that the divestiture also appeared to be an effort to fend off a possible hostile takeover bid by the Dart Group of Landover, Md.

The announcement of Eckerd's sale of its J. Byrons Department Store subsidiary to Amcena Corp. of New York City followed by two days an announcement that the Florida-based drugstore company had agreed to sell the American Home Video Corp., a chain of 207 video stores, to the Tandy Corp. The video stores, acquired by Eckerd in 1981, have consistently lost money.

Both moves followed the announcement last month that Dart, the Landover holding company for Crown Book Corp. and Trak Auto Corp., had bought 5 percent of Eckerd's stock in late May for $46.5 million and was considering buying 100 percent.

The Dart Group owned Dart Drug Stores until last year, when it sold the chain for $160 million. Eckerd has said it would fight any Dart takeover and has sued Dart for violating federal securities laws in its purchase of Eckerd stock.

Eckerd Corp., which has its headquarters in Clearwater, Fla., experienced a sharp decline in its stock price after it announced in May that it expected third-quarter earnings to drop 50 percent from last year's level. The takeover talk has stimulated interest in Eckerd stock, which finished at 29 5/8, up 5/8, yesterday

In a filing last month with the Securities and Exchange Commission, Dart Chairman Herbert H. Haft and his son, President Robert M. Haft, said they believe that "if Eckerd were to focus more on its retail drug business than on its unrelated businesses, the corporation's value could be enhanced."

Robert Haft was unavailable for comment yesterday, but Robert Hirsch, a lawyer representing Dart, said Eckerd's moves meant its leadership now believes the same thing. "Maybe we're influencing management already," he said.

Officials with Eckerd, however, said the two sales, as well as the earlier sale of its apparel subsidiary, were unrelated to the Dart takeover talk and were undertaken before Dart made its actions known.

Eckerd's chairman and president, Stewart Purley, said in a statement the three transactions are "part of the corporate strategic plan to maximize corporate assets and improve shareholders' return on equity."

In a related development this week, a federal judge in Wilmington, Del., disqualified Fried, Frank, Harris, Shriver & Jacobson from representing Eckerd in its suit against Dart. The judge said the firm's role last year in Dart's acquisition of stock in the May Department Store Corp. constituted a conflict of interest.

Although terms of the two sales this week were not disclosed, the transactions should provide Eckerd with proceeds in excess of $200 million, extra cash that analysts said would be helpful in warding off an unfriendly takeover bid.

Ed Juge, a spokesman for Tandy, said the Fort Worth-based firm would pay at least $72 million below book value for American Home Video as Tandy continues to move more heavily into the name-brand consumer electronics market. Eckerd said the sale should net the company $100 million, on top of which it expects a tax write-off of $60 million, including a $34 million write-off of nondeductible goodwill and the adjustment in the value of other assets.

Proceeds from the sale of its department stores to Amcena, which an Eckerd spokesman said was in the retailing business, are estimated to be equal to J. Byron's approximate book value, the company said. One analyst put this figure at roughly $100 million.

Industry analysts said the Eckerd moves had been in the works for a long time because its subsidiaries had proved a drain, but analysts stopped short of saying the transactions would substantially improve the company's position in resisting a takeover attempt. They noted the recent poor performance of the more than 1,500 drugstores that make up the vast majority of Eckerd's business.

"The company's retail drug business has slipped a little," said Leon J. Borchers, who follows Eckerd for Robinson Humphrey in Atlanta. "It would be positive for the company to shed these extra entities because they need all of their time and effort focused on the drug chain."