Hi Friends

I cannot delete shortcuts on desktop
I am getting this message
" Make sure the disk is not full or write protected and that the file is not currently in use "

Please help me in deleting these shortucts Actually i want blank desktop so please help me i tried everything i tried to clean desktop but no use please help me

Dani AI

Generated

The error you quoted is generic. and already suggested the basic checks (disk space and GUI file properties). If those did not fix it, the common remaining causes are: ownership mismatch (files owned by root), immutable attributes, ACLs, the Desktop sitting on a read-only or non-Unix filesystem, or the file manager holding a lock. The steps below show safe, focused diagnostics and fixes.

First confirm ownership and ordinary permission bits and fix them if needed. The listing and stat output will show who can remove the file; change owner to your user before removing or trashing it. Use the desktop trash command from a terminal rather than forcing deletions as root.

ls -la ~/Desktop
stat ~/Desktop/YourShortcut.desktop
sudo chown $(whoami):$(whoami) ~/Desktop/YourShortcut.desktop
chmod u+w ~/Desktop/YourShortcut.desktop
gio trash ~/Desktop/YourShortcut.desktop

If nothing above helps, inspect extended attributes, ACLs and the filesystem mount options. An immutable flag prevents deletion and must be cleared; ACLs can deny write even when the owner looks correct; a vfat/ntfs mount or an accidental read-only mount will also block deletes.

lsattr ~/Desktop/YourShortcut.desktop
sudo chattr -i ~/Desktop/YourShortcut.desktop
getfacl ~/Desktop/YourShortcut.desktop
findmnt --target ~

If the file manager has locked the file, quit or restart it (for example, Nautilus or PCManFM) and try again. Avoid using GUI sudo wrappers that create root-owned files in your home. If everything still fails, boot a live USB and remove the file from there after backing up. For chattr details see the manual: chattr(1) manual and for .desktop behavior see the Desktop Entry spec: .

Recommended Answers

All 2 Replies

#check disk usage
df -h

#if it is a symlink
unlink filename

#if it is a directory or file
rm -Rf  filename

#if you ar ereally adventurous...
rm -Rf ~/Desktop/*

Are you using ubuntu?

If you are, i think you can right click and go to properties. There should be an option where you can tick the "write" boxes. That should work.

When you make a shortcut its usually only "read only".

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.