How to empty trash?

classic Classic list List threaded Threaded
7 messages Options
Bob
Reply | Threaded
Open this post in threaded view
|

How to empty trash?

Bob
Being a fairly new user to Linux/Ubuntu I did a stupid thing and do not know
how to get out of it.  I have a new laptop that I am trying to set up as a
replacement of an old laptop.  I copied a my home directory from a desktop that
had an upgrade fail to the new laptop as backup before trying to recover the
desktop.  I did not check the amount of space needed and the laptop did not
have enough space so the /home partition ran out of space.  I thought no
problem I would just get rid of the data I just copied.  Not having much
experience with Ubuntu I just sent the data to trash and then tried to empty
the trash.  That does not work as I found out as the system needs disk space to
empty the trash and there is none available.  To make things worse now that
/home has no space I get logged off after about 1 1/2 minutes so I have not
been able to do much experimenting in that amount of time.

So how do I empty the trash and get the disk space back?

--
Robert Blair


In general, the art of government consists of taking as much money as possible from one party of the citizens to give to the other.  -- Voltaire  (1764)

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

Liam Proven
On Mon, 14 May 2018 at 20:15, Bob <[hidden email]> wrote:

> Being a fairly new user to Linux/Ubuntu I did a stupid thing and do not
know
> how to get out of it.  I have a new laptop that I am trying to set up as a
> replacement of an old laptop.  I copied a my home directory from a
desktop that
> had an upgrade fail to the new laptop as backup before trying to recover
the
> desktop.  I did not check the amount of space needed and the laptop did
not
> have enough space so the /home partition ran out of space.  I thought no
> problem I would just get rid of the data I just copied.  Not having much
> experience with Ubuntu I just sent the data to trash and then tried to
empty
> the trash.  That does not work as I found out as the system needs disk
space to
> empty the trash and there is none available.  To make things worse now
that
> /home has no space I get logged off after about 1 1/2 minutes so I have
not
> been able to do much experimenting in that amount of time.

> So how do I empty the trash and get the disk space back?

Well, there are several possible ways.

Firstly: do you have another copy of your backed-up stuff?

Secondly: is there a subset of the stuff you transferred you could delete
to save some space without losing everything? E.g. just the downloads
folder.

Options:

* boot off the live DVD/USB you used to install the laptop. Pick "try
Ubuntu". It will load to the desktop and you can use that to browse through
the files on the hard disk and selectively delete stuff.

* How big is the laptop HD? Is it totally full? If not, GParted (on the
live DVD/USB) might let you shrink your root partition and expand /home a
bit -- or if you don't have a separate /home, expand the Ubuntu partition a
bit.

Neither of those work?

* Command line way -- works but a high risk of disaster.

Where did you put the stuff you copied? Is it all in a single subdirectory
of your home folder?

E.g. if your user account was called bobb, it might be in
/home/bobb/transfer/.

You could boot the machine, but *not log in*.

When it's at the login screen, press Ctrl-Alt-F1.

You can log in there. Same username and password.

Then type:

cd /home/bobb

(or whatever your username is)

That puts you in your home directory.

Type:

cd transfer

To move into the directory of stuff you transferred.

Make sure the prompt now says:

bobb@laptop:~/transfer

or whatever username@computername:~/yourfolder is.

(If you didn't put it all in 1 folder, if it's in Documents and Pictures
and Music and so on, do them one by one.)

Then if you wanted to get rid of everything, type, very carefully so you
make no mistake:

rm -rf *

If you can just delete 1 big file, that'll give you room to empty the bin...

e.g.

login
cd /home/bobb
cd transfer
rm windows10.iso


--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn: liamproven
UK: +44 7939-087884 • ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

Peter Flynn
In reply to this post by Bob
On 14/05/18 19:13, Bob wrote:
> Being a fairly new user to Linux/Ubuntu I did a stupid thing and do
> not know how to get out of it.  I have a new laptop that I am trying
> to set up as a replacement of an old laptop.  I copied a my home
> directory from a desktop that had an upgrade fail to the new laptop
> as backup before trying to recover the desktop.

Not sure I understand that, but carry on.

> I did not check the amount of space needed and the laptop did not
> have enough space so the /home partition ran out of space.

The *new* laptop didn't have enough space? That's pretty unusual, I
would think.

> I thought no problem I would just get rid of the data I just copied.

Can I see if I have understood this right:

a. you copied your home directory from the old laptop to the new one
    (but where did you put it, ie what directory did you copy it to?)

b. you then copied it all over again, this time to /home/bob or
    whatever, and it ran out of space while doing this.

> Not having much experience with Ubuntu I just sent the data to trash

What data did you send to the Trash? The original copy (a) or the failed
copy (b)?

 > and then tried to empty the trash.

The problem with Trash is that it's misleading (on all systems). It's
just a directory, so it takes up exactly the same amount of space as
what you move into it, resulting in zero saving of disk space (actually
slightly worse, because on some systems it also stores the directory
that each file came *from* so they could be restored).

> That does not work as I found out as the system needs disk space to
> empty the trash and there is none available.
Right. The solution to this is to find out where the Trash directory is,
and delete its contents from the command line. The name of the Trash
directory varies from system to system. I never use it, so I have no
idea where it is in Ubuntu, but if the designers had any sense it would
be /home/bob/Trash.

Find out where it is, and then do as Liam suggested, eg:

cd /home/bob/Trash
rm -rf *

The rm command deleted files immediately and there is NO RECOVERY. It's
dangerous if you are not 100% certain that these are the files you want
to delete, but for many people it's the normal way of working. The -r
option makes it recurse into subdirectories, and the -f option means
"force", ie just do it and don't ask questions.

> To make things worse now that /home has no space I get logged off
> after about 1 1/2 minutes so I have not been able to do much
> experimenting in that amount of time.
>
> So how do I empty the trash and get the disk space back?
Liam's method should work, but please let us know success or failure.

///Peter


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

Ralf Mardorf-5
On Mon, 14 May 2018 23:10:30 +0100, Peter Flynn wrote:
>The solution to this is to find out where the Trash directory is

Most likely it's either $HOME/.local/share/Trash/ or it's a hidden file
on top of a partition's directory named .Trash-$UID .


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

MR ZenWiz
On Mon, May 14, 2018 at 11:09 PM Ralf Mardorf <[hidden email]>
wrote:

> On Mon, 14 May 2018 23:10:30 +0100, Peter Flynn wrote:
> >The solution to this is to find out where the Trash directory is

> Most likely it's either $HOME/.local/share/Trash/ or it's a hidden file
> on top of a partition's directory named .Trash-$UID .

IIRC (and it has been a while since I looked), the trash directory is
something like .Trash or ._Trash in the user's home directory.

Do 'ls -a' and see what it shows.

MR

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

Dr Rainer Woitok
Greetings,

On Monday, 2018-05-14 23:22:33 -0700, MR ZenWiz wrote:

> ...
> IIRC (and it has been a while since I looked), the trash directory is
> something like .Trash or ._Trash in the user's home directory.

Running on Xubuntu 16.04 and having never yet used the trash directory I
just moved a file to trash,  searched it in my home using "find" and was
thus guided  to the two  directories  "~/.local/share/Trash/files/"  and
"~/.local/share/Trash/info/".
Hope that helps.

Sincerely,
  Rainer

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Bob
Reply | Threaded
Open this post in threaded view
|

Re: How to empty trash?

Bob
In reply to this post by Ralf Mardorf-5
** Reply to message from Ralf Mardorf <[hidden email]> on Tue, 15 May
2018 08:07:16 +0200

> On Mon, 14 May 2018 23:10:30 +0100, Peter Flynn wrote:
> >The solution to this is to find out where the Trash directory is
>
> Most likely it's either $HOME/.local/share/Trash/ or it's a hidden file
> on top of a partition's directory named .Trash-$UID .

Thanks to all that replied.

I deleted the files in ~/.local/share/Trash/files, there were many files that
were not deleted because of permissions but enough was deleted to now do other
things.

Again thanks to all.

--
Robert Blair


You cannot multiply wealth by dividing it. -- Adrian Rogers

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users