Description

This article details the steps to remove or delete a file that is under /var/tmp by using the Command Line Interface (CLI). 

Solution

To remove or delete a file from var/tmp from the Command Line Interface (CLI), perform the following steps:

  1. Go to shell mode by using >start shell.

  2. Remove the file that is under var/tmp by specifying the directory and file name.

    • root@juniper% rm /var/tmp <filename>
  1. Make sure that the file is no longer there by running the following command: 
    • root@juniper% ls /var/tmp>> 

Alternatively, you can remove the required file from var/tmp by performing the following:

  1. Go to the directory and remove the file:

    1. root@juniper% cd /var/tmp
    2. root@juniper% ls >> to make sure you are in the right directory
    3. root@juniper% rm <filename>
    4. root@juniper% ls >> to make sure the file is no longer there

The same steps can be applied to any other file in any other directory.

Modification History

2023-08-30: Article created 

2026-08-07: Updated article to optimize keywords for search improvement