remove all cache ubuntu

C++
$ sudo apt-get clean//delete cash  //
systemd-resolve --statistics
systemd-resolve --flush-caches
Source

Also in C++: