Simply the below command will help
kafka-topics.sh --bootstrap-server server_ip:9092 --describe --topic topic_name
Along with other infos , it will print delete.retention.ms.
A sample output will be
Topic:TOPIC NAME PartitionCount:6 ReplicationFactor:1 Configs:compression.type=gzip,segment.bytes=1073741824,retention.ms=100,max.message.bytes=100001200,delete.retention.ms=100000
Topic: TOPIC NAME Partition: 0 Leader: 2 Replicas: 2 Isr: 2
Topic: TOPIC NAME Partition: 1 Leader: 3 Replicas: 3 Isr: 3
Topic: TOPIC NAME Partition: 2 Leader: 1 Replicas: 1 Isr: 1
Topic: TOPIC NAME Partition: 3 Leader: 2 Replicas: 2 Isr: 2
Topic: TOPIC NAME Partition: 4 Leader: 3 Replicas: 3 Isr: 3
Topic: TOPIC NAME Partition: 5 Leader: 1 Replicas: 1 Isr: 1