2

I had about 170 MiB free space in my Raspberry Pi so I decided to delete the .deb packages (about 800 MiB) in /var/cache/apt.

I opened sudo pcmanfm, selected the files and pressed the delete button (not shift+delete). The files were gone, but the free space did not increase.

The pcmanfm window with elevated privileges says that recycle bin is not supported, and the files did not go to ordinary recycle bin.

If the free space did not increase, then where did the files go, and how to delete them properly?

I am using latest version of Raspbian.

Edit:

The deleted files were in /root/.local/share/Trash/files/. They were found following the accepted answer.

5
  • 1
    can you check this askubuntu.com/questions/65549/…
    – Kamaraj
    Jan 25, 2017 at 6:20
  • I cleaned them manually, but the space did not increase, probably because recycle bin is not supported in elevated privilege mode of pcmanfm Jan 25, 2017 at 6:33
  • 2
    You could have this folder /.Trash-0 which has two sub-folders info, files you need to clean that, too.
    – Michael D.
    Jan 25, 2017 at 7:50
  • @MichaelD. .local/share/Trash/ was almost empty (16 KB), and I could not find any .Trash-0. Another thing, somehow the free space has automatically increased to 270 MB. Jan 26, 2017 at 4:28
  • If a file is open in write mode by a program, its disk usage will be maintained until that file handle is closed (possibly when the program stops), even if you remove it from the directory. So, for example, if you start a huge copy command in a shell and consult the usage on another shell, you'll see the free space go down. Now if you remove the file from the second shell, the disk space will not be released until the first command ends. Jan 27, 2017 at 17:58

1 Answer 1

2

The following command will print all debian packages found on the system:

sudo find / -type f -iname "*.deb"

this will delete them:

sudo find / -type f -iname "*.deb" -exec rm -v {} \;

If the free space did not increase, then where did the files go, and how to delete them properly?

PCManFM's trashcan location is: ~/.local/share/Trash/files it could go there.

Clear unused packages from cache:

sudo apt-get autoclean

clear all cached packages:

sudo apt-get clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.