Bumping up posts or double posting is not permitted in these forums.
Please read the rules, which you agreed to when you registered, if you have not already done so.
You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future
Thank You.
The UNIX and Linux Forums.
---------- Post updated at 11:52 ---------- Previous update was at 11:44 ----------
Taking a look at man sftp, I see two commands that would match:
rm path
Delete remote file specified by path.
rmdir path
Remove remote directory specified by path.
Both take no arguments. 'rm', in this case is only for files, while 'rmdir' is only for empty directories. Both are completely independent of the usual shell commands you might know, but are instead a part of the SSH server (sftp module).
You can probably remove all the files you fetched using 'rm *' (assuming you have the rights to do so), but you'll have to descend into each directory you got, remove the files, and then remove the directory.
A faster, but less portable, way would be to fetch the files using sftp, and then delete them using
ssh user@host 'cd /path/for/files; rm -r *'
Be advised, though, using 'rm -r' without care can easily result in a damaged system, and should be avoided where ever possible.