diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp
index 94799f8..7f51565 100644
--- a/gdb/testsuite/gdb.base/step-line.exp
+++ b/gdb/testsuite/gdb.base/step-line.exp
@@ -82,6 +82,4 @@ gdb_test "next" \
          ".*RETURN \\(j\\);.*" \
 	 "next over dummy 10"
 
-remote_file host delete ${remote_linefile}
-
 return 0
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 029104b..f27e1cc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -35,5 +35,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 # Force the debugger to create the file1.txt symtab, to make sure that
 # the debugger does not crash doing so.
 gdb_test "list file1.txt:1" "File 1 Line 1.*File 1 Line 8" "list file1.txt"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 7823eaa..86f0d84 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -35,5 +35,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index 76009d2..fbacced 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -37,5 +37,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index c9ead97..5e4a5c0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -42,5 +42,3 @@ gdb_test "interpreter-exec mi -file-list-exec-source-files" \
 
 # And `info sources' should return the fullname incl. the directories.
 gdb_test "info sources" {[/\\]file1\.txt}
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 4a23c96..ce1c15f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -42,5 +42,3 @@ gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 
 gdb_test "ptype func_cu1" "type = int2 \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index 2f95572..b48bd31 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -35,5 +35,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 6846b17..22f0705 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -33,5 +33,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index e736211..66f9a0a 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -36,5 +36,3 @@ set remote_dwarf_srcfile [gdb_remote_download host \
 gdb_test_no_output "set listsize 1"
 gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4"
 gdb_test "ptype func_cu1" "type = int \\(\\)"
-
-remote_file host delete ${remote_dwarf_srcfile}
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 91142fe..295ed16 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -498,7 +498,6 @@ gdb_start
 set file [remote_download host $GDB_FULLPATH $xgdb]
 set result [test_with_self $file]
 gdb_exit
-catch "remote_file host delete $file"
 
 if {$result <0} then {
     warning "Couldn't test self"
diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp
index d5e4193..b02c426 100644
--- a/gdb/testsuite/gdb.mi/mi-logging.exp
+++ b/gdb/testsuite/gdb.mi/mi-logging.exp
@@ -83,5 +83,3 @@ if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*runnin
 }
 
 mi_gdb_exit
-
-remote_file host delete $milogfile
diff --git a/gdb/testsuite/gdb.opencl/callfuncs.exp b/gdb/testsuite/gdb.opencl/callfuncs.exp
index 9a88513..f374be1 100644
--- a/gdb/testsuite/gdb.opencl/callfuncs.exp
+++ b/gdb/testsuite/gdb.opencl/callfuncs.exp
@@ -93,6 +93,3 @@ call_test "float" "f"
 if { ${have_cl_khr_fp64} } {
   call_test "double" "d"
 }
-
-# Delete the OpenCL program source
-remote_file target delete ${clprogram}
diff --git a/gdb/testsuite/gdb.opencl/convs_casts.exp b/gdb/testsuite/gdb.opencl/convs_casts.exp
index c9ebb63..bc727f9 100644
--- a/gdb/testsuite/gdb.opencl/convs_casts.exp
+++ b/gdb/testsuite/gdb.opencl/convs_casts.exp
@@ -90,6 +90,3 @@ vec_casts "f"
 if { ${have_cl_khr_fp64} } {
   vec_casts "d"
 }
-
-# Delete the OpenCL program source
-remote_file target delete ${clprogram}
diff --git a/gdb/testsuite/gdb.opencl/datatypes.exp b/gdb/testsuite/gdb.opencl/datatypes.exp
index df2a918..c14b0b8 100644
--- a/gdb/testsuite/gdb.opencl/datatypes.exp
+++ b/gdb/testsuite/gdb.opencl/datatypes.exp
@@ -466,6 +466,3 @@ if { ${have_cl_khr_fp64} } {
   gdb_test "p sizeof(d16)" " = 128"
   gdb_test "print d16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}"
 }
-
-# Delete the OpenCL program source
-remote_file target delete ${clprogram}
diff --git a/gdb/testsuite/gdb.opencl/operators.exp b/gdb/testsuite/gdb.opencl/operators.exp
index 215cddd..1780a08 100644
--- a/gdb/testsuite/gdb.opencl/operators.exp
+++ b/gdb/testsuite/gdb.opencl/operators.exp
@@ -951,5 +951,3 @@ do_check "f" "float" 1 4
 if { ${have_cl_khr_fp64} } {
   do_check "d" "double" 1 8
 }
-# Delete the OpenCL program source
-remote_file target delete ${clprogram}
diff --git a/gdb/testsuite/gdb.opencl/vec_comps.exp b/gdb/testsuite/gdb.opencl/vec_comps.exp
index 4707646..b2f4adf 100644
--- a/gdb/testsuite/gdb.opencl/vec_comps.exp
+++ b/gdb/testsuite/gdb.opencl/vec_comps.exp
@@ -385,6 +385,3 @@ do_check "f16" "float" "float" 4
 if { ${have_cl_khr_fp64} } {
   do_check "d16" "double" "double" 8
 }
-
-# Delete the OpenCL program source
-remote_file target delete ${clprogram}
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 4c50be8..de4d159 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -68,5 +68,3 @@ gdb_test_no_output "set print frame-arguments all"
 gdb_test "frame" \
     ".*foo \\(x=42, ss={a = {m = 1}, b = {m = 2}}\\).*" \
     "frame raw,all"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index 948ae94..5949919 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -188,8 +188,6 @@ gdb_test_multiple "bt 1" $test {
     }
 }
 
-remote_file host delete ${remote_python_file}
-
 # Test with no debuginfo
 
 # We cannot use prepare_for_testing as we have to set the safe-patch
@@ -230,8 +228,6 @@ gdb_test_no_output "set python print-stack full" \
     "set python print-stack full for no debuginfo tests"
 
 # Load global frame-filters
-set remote_python_file [gdb_remote_download host \
-			    ${srcdir}/${subdir}/${testfile}.py]
 gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
     "Load python file for no debuginfo tests"
 
diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp
index 5959175..ca02bf7 100644
--- a/gdb/testsuite/gdb.python/py-mi.exp
+++ b/gdb/testsuite/gdb.python/py-mi.exp
@@ -356,5 +356,3 @@ mi_list_varobj_children fake.private {
 
 mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \
     "\\^done" "Install visualizer on a cplus_fake_child"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 55f505f..298bc3e 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -53,5 +53,3 @@ gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
 gdb_test "continue" ".*Breakpoint.*"
 
 gdb_test "print ss" " = a=<1> b=<2>"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index 8149bde..ac4403d 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -35,5 +35,3 @@ gdb_test_no_output "source ${remote_python_file}" \
 gdb_test "print *t" " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
 
 gdb_test "print /r *t" "= 1384395743"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index 8149bde..ac4403d 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -35,5 +35,3 @@ gdb_test_no_output "source ${remote_python_file}" \
 gdb_test "print *t" " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
 
 gdb_test "print /r *t" "= 1384395743"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 1096389..ae866f0 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -108,8 +108,6 @@ proc run_lang_tests {exefile lang} {
 	"print nstype on one line"
 
     gdb_continue_to_end
-
-    remote_file host delete ${remote_python_file}
 }
 
 run_lang_tests "${binfile}" "c"
@@ -155,5 +153,3 @@ gdb_test_no_output "python enable_lookup_function ()"
 
 gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>" \
     "print ss enabled #2"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 4f465cc..5c868d7 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -72,5 +72,3 @@ gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
 gdb_test "continue" ".*Breakpoint.*"
 
 gdb_test "print ss" " = a=<1> b=<2>"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 1de80bd..ee02091 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -51,5 +51,3 @@ gdb_test_no_output "enable type-printer string"
 gdb_test "whatis bs" "string" "whatis with enabled printer"
 
 gdb_test "whatis s" "templ<string>"
-
-remote_file host delete ${remote_python_file}
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 8824127..093b4bc 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -149,5 +149,3 @@ gdb_test_no_output "disable xmethod progspace E_methods;method_int" \
   "disable xmethod progspace E_methods;method_int"
 gdb_test "info xmethod progspace E_methods;method_int" ".* \\\[disabled\\\]" \
   "info xmethod xmethods E_methods;method_int"
-
-remote_file host delete ${xmethods_script}
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index 5746770..8fa3de8 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -285,8 +285,6 @@ if  { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
      return -1
 }
 
-remote_file build delete ${srcfile}
-
 # Start with a fresh gdb
 gdb_exit
 gdb_start
@@ -325,6 +323,4 @@ gdb_expect 60 {
 
 do_tests
 
-remote_file host delete ${binfile}
-
 return 0
diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp
index 9f44109..438f06a 100644
--- a/gdb/testsuite/gdb.trace/save-trace.exp
+++ b/gdb/testsuite/gdb.trace/save-trace.exp
@@ -130,7 +130,6 @@ gdb_test "source savetrace.tr" \
 	"Tracepoint \[0-9\]+ at .*" \
 	"10.2: read back saved tracepoints"
 gdb_verify_tracepoints "10.2: verify recovered tracepoints"
-remote_file host delete savetrace.tr
 
 # 10.3 repeat with a path to the file
 
@@ -148,7 +147,6 @@ gdb_test "source $trace_file_name" \
 	"Tracepoint \[0-9\]+ at .*" \
 	"10.4: read saved tracepoints, full path"
 gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path"
-remote_file host delete $trace_file_name
 
 # 10.5 invalid filename
 #      [deferred -- not sure what a good invalid filename would be]
diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp
index 535c323..364d5b8 100644
--- a/gdb/testsuite/gdb.xml/tdesc-arch.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp
@@ -88,8 +88,6 @@ proc set_arch { arch which } {
     gdb_test $cmd \
 	"The target architecture is set automatically \\(currently $arch\\)" \
 	"$cmd ($which architecture)"
-
-    remote_file host delete $filename
 }
 
 set_arch $arch1 first
@@ -116,5 +114,3 @@ set cmd "show architecture"
 gdb_test $cmd \
     "The target architecture is set automatically \\(currently $default_arch\\)" \
     "$cmd (invalid architecture)"
-
-remote_file host delete $filename
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 0e4547c..938531d 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -140,10 +140,6 @@ proc load_description { file errmsg } {
 	    pass $msg
 	}
     }
-
-    if {[is_remote host]} {
-	remote_file host delete "regs.xml"
-    }
 }
 
 if {![is_remote host]} {
@@ -167,7 +163,3 @@ gdb_test "ptype \$bitfields" \
 load_description "core-only.xml" ""
 # The extra register from the previous description should be gone.
 gdb_test "ptype \$extrareg" "type = void"
-
-foreach src ${core-regs} {
-    remote_file host delete $remote_filename($src)
-}
diff --git a/gdb/testsuite/lib/cell.exp b/gdb/testsuite/lib/cell.exp
index bcacfa7..064c265 100644
--- a/gdb/testsuite/lib/cell.exp
+++ b/gdb/testsuite/lib/cell.exp
@@ -144,7 +144,6 @@ gdb_caching_proc skip_cell_tests {
         }
     }
     gdb_exit
-    remote_file build delete $exe
 
     verbose "$me:  returning $result" 2
     return $result
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1019ecd..f5de9d0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2191,7 +2191,6 @@ gdb_caching_proc skip_altivec_tests {
         }
     }
     gdb_exit
-    remote_file build delete $exe
 
     verbose "$me:  returning $skip_vmx_tests" 2
     return $skip_vmx_tests
@@ -2273,7 +2272,6 @@ gdb_caching_proc skip_vsx_tests {
         }
     }
     gdb_exit
-    remote_file build delete $exe
 
     verbose "$me:  returning $skip_vsx_tests" 2
     return $skip_vsx_tests
@@ -2339,7 +2337,6 @@ gdb_caching_proc skip_btrace_tests {
         }
     }
     gdb_exit
-    remote_file build delete $exe
 
     verbose "$me:  returning $skip_btrace_tests" 2
     return $skip_btrace_tests
@@ -3027,7 +3024,6 @@ proc gdb_compile_shlib {sources dest options} {
 		 || [istarget *-*-pe*]) } {
 	    set dest_tail_name [file tail ${dest}]
 	    remote_upload host $dest_tail_name.a ${dest}.a
-	    remote_file host delete $dest_tail_name.a
 	}
     }
   return ""
@@ -3531,14 +3527,9 @@ proc gdb_remote_download {dest fromfile {tofile {}}} {
 # gdb_download
 #
 # Copy a file to the remote target and return its target filename.
-# Schedule the file to be deleted at the end of this test.
 
 proc gdb_download { filename } {
-    global cleanfiles
-
-    set destname [remote_download target $filename]
-    lappend cleanfiles $destname
-    return $destname
+    return [remote_download target $filename]
 }
 
 # gdb_load_shlibs LIB...
@@ -3592,11 +3583,8 @@ proc default_gdb_init { test_file_name } {
     global gdb_wrapper_initialized
     global gdb_wrapper_target
     global gdb_test_file_name
-    global cleanfiles
     global pf_prefix
     
-    set cleanfiles {}
-
     gdb_clear_suppressed
 
     set gdb_test_file_name [file rootname [file tail $test_file_name]]
@@ -3843,7 +3831,6 @@ proc gdb_init { test_file_name } {
 proc gdb_finish { } {
     global gdbserver_reconnect_p
     global gdb_prompt
-    global cleanfiles
 
     # Give persistent gdbserver a chance to terminate before GDB is killed.
     if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p
@@ -3862,11 +3849,6 @@ proc gdb_finish { } {
     # Exit first, so that the files are no longer in use.
     gdb_exit
 
-    if { [llength $cleanfiles] > 0 } {
-	eval remote_file target delete $cleanfiles
-	set cleanfiles {}
-    }
-
     # Unblock write access to the banned variables.  Dejagnu typically
     # resets some of them between testcases.
     global banned_variables
diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp
index 0b5ba4b..cb30430 100644
--- a/gdb/testsuite/lib/opencl.exp
+++ b/gdb/testsuite/lib/opencl.exp
@@ -45,7 +45,6 @@ gdb_caching_proc skip_opencl_tests {
     set compile_flags {debug nowarnings quiet}
 
     if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "${compile_flags}" ] != "" } {
-	remote_file target delete ${clprogram}
         verbose "$me:  compiling OpenCL binary failed, returning 1" 2
 	return 1
     }
@@ -68,10 +67,6 @@ gdb_caching_proc skip_opencl_tests {
         }
     }
     gdb_exit
-    remote_file build delete $executable
-
-    # Delete the OpenCL program source file.
-    remote_file target delete ${clprogram}
 
     verbose "$me:  returning $result" 2
     return $result
diff --git a/gdb/testsuite/lib/perftest.exp b/gdb/testsuite/lib/perftest.exp
index 6b1cab4..663095c 100644
--- a/gdb/testsuite/lib/perftest.exp
+++ b/gdb/testsuite/lib/perftest.exp
@@ -30,14 +30,6 @@ namespace eval PerfTest {
 	gdb_test_no_output "python exec (open ('${remote_python_file}').read ())"
     }
 
-    # A private method to do some cleanups when performance test is
-    # finished.
-    proc _teardown_perftest {} {
-	variable remote_python_file
-
-	remote_file host delete $remote_python_file
-    }
-
     # Compile source files of test case.  BODY is the tcl code to do
     # actual compilation.  Return zero if compilation is successful,
     # otherwise return non-zero.
@@ -98,8 +90,6 @@ namespace eval PerfTest {
 	_setup_perftest
 
 	eval run {$run}
-
-	_teardown_perftest
     }
 }
 
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 9335477..50afe7e 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -147,7 +147,6 @@ proc do_self_tests {function body} {
     }
 
     gdb_exit
-    catch "remote_file host delete $file"
 
     if {$result < 0} then {
 	warning "Couldn't test self"
