Result of after entering free in terminal

ronay@MackbookPro:~$ free
              total        used        free      shared  buff/cache   available
Mem:        3893824     2748748      120040      164192     1025036      748844
Swap:       2097148      477604     1619544

How to clear cache here? I am new to ubuntu


You should not touch the cache. It is managed by the operating system.

Linux strives to maximize the use of fast RAM. Anything not needed for your applications will be used as temporary cache. Items written to disk will be kept in memory, so later on, if the item is needed again, it can be retrieved from fast memory rather than from slower disk, and so the program saving the file has done quickly with it and can continue to do other things. From the cache, the file is then committed to disk in the background.

That is why your free memory may be low on a linux system. However, that does not mean your applications will run out of memory. It is the column available that indicates the memory that is actually available for you. If more memory is required by applications, that will be taken from the free memory and from the cached memory. In addition, linux has also swap memory, i.e., memory of applications that are loaded, but not currently in use, may be stored on disk to free memory for active applications and a minimum of cache memory.

Thus, there is not any benefit in clearing the cache - it would slow down disk based operations. Better use unused memory for cache than leaving it free.