Post(s) tagged Ubuntu

How to completely remove application from command line in Debian system

Using the below command to remove the application completely from any Debian based operating systems

sudo apt-get purge [packagename]
sudo apt-get autoclean
sudo apt-get autoremove

Note: remove the package name with application name going to remove

17 Views Posted on February 01, 2022

How to clear RAM Memory Cache, Buffer and Swap Space on Linux

Clear page cache only

# sync; echo 1 > /proc/sys/vm/drop_caches

Clear dentries and inodes

# sync; echo 2 > /proc/sys/vm/drop_caches

Clear page cache, dentries, and inodes

# sync; echo 3 > /proc/sys/vm/drop_caches 

Now we will be creating a shell script to auto clear RAM cache daily at 3 am via a cron scheduler task.
Create a shell script and add the following lines.

# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
echo "echo 3 > /proc/sys/vm/drop_caches"

Change the permission on the using the below command

chmod 755

Next, open crontab for editing

crontab -e

Add the below line, save and exit to run it at 3 am daily.

0  3  *  *  *  /path/to/

List the crontab and verify using the below command

crontab -l

8 Views Posted on March 24, 2022