How to resolve “permission denied” when emptying the trash?












4














I installed a game, and then decided to erase it. I sent it to the recycle bin, but I was unable to delete it completely (Permission denied). When I moved it back to the desktop, a copy remained in the recycle.
I sent it back to the bin, and back to the desktop; so I ended with 2 copies of the file in the bin, and one on the desktop.
Finally I noticed that a file inside the game was protected. I changed the permission settings to the desktop copy and I was able to erase it completely, but I was not able to change the permission settings on the 2 copies I still have in the bin (the backend do not support the operation)



I just want to empty the recycle bin!










share|improve this question





























    4














    I installed a game, and then decided to erase it. I sent it to the recycle bin, but I was unable to delete it completely (Permission denied). When I moved it back to the desktop, a copy remained in the recycle.
    I sent it back to the bin, and back to the desktop; so I ended with 2 copies of the file in the bin, and one on the desktop.
    Finally I noticed that a file inside the game was protected. I changed the permission settings to the desktop copy and I was able to erase it completely, but I was not able to change the permission settings on the 2 copies I still have in the bin (the backend do not support the operation)



    I just want to empty the recycle bin!










    share|improve this question



























      4












      4








      4


      2





      I installed a game, and then decided to erase it. I sent it to the recycle bin, but I was unable to delete it completely (Permission denied). When I moved it back to the desktop, a copy remained in the recycle.
      I sent it back to the bin, and back to the desktop; so I ended with 2 copies of the file in the bin, and one on the desktop.
      Finally I noticed that a file inside the game was protected. I changed the permission settings to the desktop copy and I was able to erase it completely, but I was not able to change the permission settings on the 2 copies I still have in the bin (the backend do not support the operation)



      I just want to empty the recycle bin!










      share|improve this question















      I installed a game, and then decided to erase it. I sent it to the recycle bin, but I was unable to delete it completely (Permission denied). When I moved it back to the desktop, a copy remained in the recycle.
      I sent it back to the bin, and back to the desktop; so I ended with 2 copies of the file in the bin, and one on the desktop.
      Finally I noticed that a file inside the game was protected. I changed the permission settings to the desktop copy and I was able to erase it completely, but I was not able to change the permission settings on the 2 copies I still have in the bin (the backend do not support the operation)



      I just want to empty the recycle bin!







      permissions trash






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 23 '12 at 19:52









      Jjed

      10.7k65989




      10.7k65989










      asked Apr 23 '12 at 19:43









      fusqfusq

      23113




      23113






















          3 Answers
          3






          active

          oldest

          votes


















          4














          The following command will empty the trash



          sudo rm -rv .local/share/Trash/


          And when you don't want any prompts with 'Do you want to delete write protected file x?' add the -f option.



          sudo rm -rvf .local/share/Trash/





          share|improve this answer























          • Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
            – OrangeTux
            Apr 24 '12 at 9:19





















          1














          A solution is to first change permissions in the Trash folder

          (and then to empty it in the usual way:)



          cd ~/.local/share/Trash
          sudo chown -R your_user_name:your_group *



          (And then empty it the usual way)






          share|improve this answer





























            0














            I didn't even had local Trash folder, for me solution was to create it and than give permissions to local user over everything in that folder.



            mkdir /home/(username)/.local/share/Trash


            and than:



            sudo chown -R username:username Trash/





            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f124554%2fhow-to-resolve-permission-denied-when-emptying-the-trash%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              The following command will empty the trash



              sudo rm -rv .local/share/Trash/


              And when you don't want any prompts with 'Do you want to delete write protected file x?' add the -f option.



              sudo rm -rvf .local/share/Trash/





              share|improve this answer























              • Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
                – OrangeTux
                Apr 24 '12 at 9:19


















              4














              The following command will empty the trash



              sudo rm -rv .local/share/Trash/


              And when you don't want any prompts with 'Do you want to delete write protected file x?' add the -f option.



              sudo rm -rvf .local/share/Trash/





              share|improve this answer























              • Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
                – OrangeTux
                Apr 24 '12 at 9:19
















              4












              4








              4






              The following command will empty the trash



              sudo rm -rv .local/share/Trash/


              And when you don't want any prompts with 'Do you want to delete write protected file x?' add the -f option.



              sudo rm -rvf .local/share/Trash/





              share|improve this answer














              The following command will empty the trash



              sudo rm -rv .local/share/Trash/


              And when you don't want any prompts with 'Do you want to delete write protected file x?' add the -f option.



              sudo rm -rvf .local/share/Trash/






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 23 '12 at 20:13

























              answered Apr 23 '12 at 20:02









              OrangeTuxOrangeTux

              3,58282452




              3,58282452












              • Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
                – OrangeTux
                Apr 24 '12 at 9:19




















              • Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
                – OrangeTux
                Apr 24 '12 at 9:19


















              Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
              – OrangeTux
              Apr 24 '12 at 9:19






              Can you set set my answer as 'Accepted answer'? meta.stackexchange.com/questions/5234/…
              – OrangeTux
              Apr 24 '12 at 9:19















              1














              A solution is to first change permissions in the Trash folder

              (and then to empty it in the usual way:)



              cd ~/.local/share/Trash
              sudo chown -R your_user_name:your_group *



              (And then empty it the usual way)






              share|improve this answer


























                1














                A solution is to first change permissions in the Trash folder

                (and then to empty it in the usual way:)



                cd ~/.local/share/Trash
                sudo chown -R your_user_name:your_group *



                (And then empty it the usual way)






                share|improve this answer
























                  1












                  1








                  1






                  A solution is to first change permissions in the Trash folder

                  (and then to empty it in the usual way:)



                  cd ~/.local/share/Trash
                  sudo chown -R your_user_name:your_group *



                  (And then empty it the usual way)






                  share|improve this answer












                  A solution is to first change permissions in the Trash folder

                  (and then to empty it in the usual way:)



                  cd ~/.local/share/Trash
                  sudo chown -R your_user_name:your_group *



                  (And then empty it the usual way)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 27 '14 at 17:26









                  Rafael NonatoRafael Nonato

                  211




                  211























                      0














                      I didn't even had local Trash folder, for me solution was to create it and than give permissions to local user over everything in that folder.



                      mkdir /home/(username)/.local/share/Trash


                      and than:



                      sudo chown -R username:username Trash/





                      share|improve this answer


























                        0














                        I didn't even had local Trash folder, for me solution was to create it and than give permissions to local user over everything in that folder.



                        mkdir /home/(username)/.local/share/Trash


                        and than:



                        sudo chown -R username:username Trash/





                        share|improve this answer
























                          0












                          0








                          0






                          I didn't even had local Trash folder, for me solution was to create it and than give permissions to local user over everything in that folder.



                          mkdir /home/(username)/.local/share/Trash


                          and than:



                          sudo chown -R username:username Trash/





                          share|improve this answer












                          I didn't even had local Trash folder, for me solution was to create it and than give permissions to local user over everything in that folder.



                          mkdir /home/(username)/.local/share/Trash


                          and than:



                          sudo chown -R username:username Trash/






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 27 '18 at 10:32









                          HarveyHarvey

                          992




                          992






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f124554%2fhow-to-resolve-permission-denied-when-emptying-the-trash%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Mouse cursor on multiple screens with different PPI

                              Agildo Ribeiro

                              Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”