how to emptry trash on command line from ubuntu 10.04

Posted on 2011-09-03
Medium Priority
Last Modified: 2012-05-12

how could i empty trash from the command line on ubuntu 10.04 ? thanks.
Question by:zizi21
  • 2
  • 2
LVL 38

Accepted Solution

Gerwin Jansen, EE MVE earned 2000 total points
ID: 36477699
These 2 commands will empty 'your' trash:
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.local/share/Trash/info/*

Open in new window


Author Comment

ID: 36479153
Thanks a million

Author Comment

ID: 36479198
But i cant find the trash on the local computer ?
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 36479787
You mean you can't find the trash folder? You can display it like this:

ls -al ~/.local/share

Open in new window

If I have something in trash, the trash icon (right lower corner of desktop) is 'filled'. When deleting the contents through the script, the trash icon shows 'emptied'.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
Cron is one of the most popular and basic utilities found on Unix systems. Combined with other tools, cron makes it exceptionally easy to automate a broad range of tasks on your server.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question