how to delete all files in .recycle folder in linux suse using putty?
i tries using " rm -rf .local/share/Trash/* "
but it doesn't work.
hoping for any response.

another question..is the .recycle folder in linux server eats up some
space in the partition in the server??

tnx..

Dani AI

Generated

Brief troubleshooting notes for (and following up on 's request for command output): when a remove attempt shows no error but files remain, the usual causes are wrong path (relative vs absolute), insufficient privileges, filesystem attributes (immutable), or the files living on a different account/share. The steps below locate the actual recycle/trash directories, show who owns them and how much space they use, and remove contents safely and verbosely.

Run these checks (replace /path/to/that/dir with the real path you find):

# locate candidate trash/recycle directories on the local filesystem
sudo find / -xdev \( -type d -name ".recycle" -o -name ".Trash*" \) -print

# inspect size and ownership
sudo du -sh /path/to/that/dir
ls -ld /path/to/that/dir
ls -la /path/to/that/dir

# check for immutable attribute (prevents deletion)
lsattr -d /path/to/that/dir
lsattr -a /path/to/that/dir/*

# safely delete contents while listing what is removed
sudo find /path/to/that/dir -mindepth 1 -print -exec rm -v -- {} +

If lsattr shows the i flag, clear it before deleting (for example with sudo chattr -i /path/to/file). If files are owned by another user/root, remove them as that account or change ownership carefully. If the directory is on a network share (Samba/NFS), check mount info (df -h /path/to/that/dir and mount) and, for Samba, look for a server-side recycle configuration in /etc/samba/smb.conf (grep for "recycle" or "vfs_recycle"). As a safer alternative to immediate deletion, move large items to a temporary folder so you can verify on-disk space is freed before permanent removal.

Caution: double-check absolute paths before running recursive deletions and keep backups if unsure. After cleaning, confirm freed space with df -h or sudo du -sh on the parent mount.

Recommended Answers

All 2 Replies

You said it doesn't work. What output do you get when you try "rm -rf .local/share/Trash/*" ?

Yes, the trash does take up space on your system, at least it does on mine.

hey, tnx chris for the response...when i typed "rm -rf .local/share/Trash/" nothing happens.no error message appears.and when i checked the server itself the files stills there

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.