How to use bleachbit to clean other mounted drives and specific folders?











up vote
1
down vote

favorite
1












I use bleachbit to clean (deep scan) my home directory:



bleachbit -c --preset


But I want to use bleachbit to clean my other mounted drives like /media/device1 and specific folders /home/eka/dir/dir1. How can I do this in bleachbit?



edit:



sample of modified path in deepscan.xml



<option id="ds_store">
<label translate="false">.DS_Store</label>
<description>Delete the files</description>
<warning>This option is slow.</warning>
<action command="delete" search="deep" cache="false" regex="^.DS_Store$" path="/media/device1"/>
</option>


initial result of python bleachbit.py --preset -c



 deepscans={u'/home/eka': [{'regex': u'\.[Bb][Aa][Kk]$', 'nregex': '', 'cache': False, 'command': u'delete', 'path': u'/home/eka'}









share|improve this question




























    up vote
    1
    down vote

    favorite
    1












    I use bleachbit to clean (deep scan) my home directory:



    bleachbit -c --preset


    But I want to use bleachbit to clean my other mounted drives like /media/device1 and specific folders /home/eka/dir/dir1. How can I do this in bleachbit?



    edit:



    sample of modified path in deepscan.xml



    <option id="ds_store">
    <label translate="false">.DS_Store</label>
    <description>Delete the files</description>
    <warning>This option is slow.</warning>
    <action command="delete" search="deep" cache="false" regex="^.DS_Store$" path="/media/device1"/>
    </option>


    initial result of python bleachbit.py --preset -c



     deepscans={u'/home/eka': [{'regex': u'\.[Bb][Aa][Kk]$', 'nregex': '', 'cache': False, 'command': u'delete', 'path': u'/home/eka'}









    share|improve this question


























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      I use bleachbit to clean (deep scan) my home directory:



      bleachbit -c --preset


      But I want to use bleachbit to clean my other mounted drives like /media/device1 and specific folders /home/eka/dir/dir1. How can I do this in bleachbit?



      edit:



      sample of modified path in deepscan.xml



      <option id="ds_store">
      <label translate="false">.DS_Store</label>
      <description>Delete the files</description>
      <warning>This option is slow.</warning>
      <action command="delete" search="deep" cache="false" regex="^.DS_Store$" path="/media/device1"/>
      </option>


      initial result of python bleachbit.py --preset -c



       deepscans={u'/home/eka': [{'regex': u'\.[Bb][Aa][Kk]$', 'nregex': '', 'cache': False, 'command': u'delete', 'path': u'/home/eka'}









      share|improve this question















      I use bleachbit to clean (deep scan) my home directory:



      bleachbit -c --preset


      But I want to use bleachbit to clean my other mounted drives like /media/device1 and specific folders /home/eka/dir/dir1. How can I do this in bleachbit?



      edit:



      sample of modified path in deepscan.xml



      <option id="ds_store">
      <label translate="false">.DS_Store</label>
      <description>Delete the files</description>
      <warning>This option is slow.</warning>
      <action command="delete" search="deep" cache="false" regex="^.DS_Store$" path="/media/device1"/>
      </option>


      initial result of python bleachbit.py --preset -c



       deepscans={u'/home/eka': [{'regex': u'\.[Bb][Aa][Kk]$', 'nregex': '', 'cache': False, 'command': u'delete', 'path': u'/home/eka'}






      command-line cleanup bleachbit






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 29 at 15:41

























      asked Nov 17 at 16:35









      Eka

      97361737




      97361737






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          As of BleachBit 2.0, deep scan defaults to the home user directory. There is not a way in the GUI to change it, but I think this will work




          1. Copy the deepscan.xml that came with BleachBit to ~/.config/bleachbit/cleaners

          2. Change id="deepscan" to id="mydeepscan"

          3. Add the attribute path="/media/device1" to each <action> element


          Then a new DeepScan option will show up, and you can select it.



          You may also want to change the <label> elements too.





          Update, here is a working, tested example of an option that cleans logs in /var/log instead of in the user home directory. Notice there is an attribute path=




          <option id="log">

          <label>Log</label>

          <description>Delete the logs</description>

          <action command="delete" search="deep" cache="false" path="/var/log" regex=".log$"/>
          </option>



          Please note that this XML goes into a CleanerML .xml file. In my case, I added it to the existing deepscan.xml, but it could go into a new .xml file that is in the right folder.






          share|improve this answer























          • it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
            – Eka
            Nov 19 at 9:31












          • @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
            – Andrew
            Nov 26 at 17:35










          • No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
            – Eka
            Nov 27 at 9:28










          • @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
            – Andrew
            Nov 28 at 1:21










          • @eka By the way, I edited my answer to show the log cleaner that I tested.
            – Andrew
            Nov 28 at 1:22











          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',
          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%2f1093760%2fhow-to-use-bleachbit-to-clean-other-mounted-drives-and-specific-folders%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          As of BleachBit 2.0, deep scan defaults to the home user directory. There is not a way in the GUI to change it, but I think this will work




          1. Copy the deepscan.xml that came with BleachBit to ~/.config/bleachbit/cleaners

          2. Change id="deepscan" to id="mydeepscan"

          3. Add the attribute path="/media/device1" to each <action> element


          Then a new DeepScan option will show up, and you can select it.



          You may also want to change the <label> elements too.





          Update, here is a working, tested example of an option that cleans logs in /var/log instead of in the user home directory. Notice there is an attribute path=




          <option id="log">

          <label>Log</label>

          <description>Delete the logs</description>

          <action command="delete" search="deep" cache="false" path="/var/log" regex=".log$"/>
          </option>



          Please note that this XML goes into a CleanerML .xml file. In my case, I added it to the existing deepscan.xml, but it could go into a new .xml file that is in the right folder.






          share|improve this answer























          • it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
            – Eka
            Nov 19 at 9:31












          • @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
            – Andrew
            Nov 26 at 17:35










          • No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
            – Eka
            Nov 27 at 9:28










          • @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
            – Andrew
            Nov 28 at 1:21










          • @eka By the way, I edited my answer to show the log cleaner that I tested.
            – Andrew
            Nov 28 at 1:22















          up vote
          1
          down vote













          As of BleachBit 2.0, deep scan defaults to the home user directory. There is not a way in the GUI to change it, but I think this will work




          1. Copy the deepscan.xml that came with BleachBit to ~/.config/bleachbit/cleaners

          2. Change id="deepscan" to id="mydeepscan"

          3. Add the attribute path="/media/device1" to each <action> element


          Then a new DeepScan option will show up, and you can select it.



          You may also want to change the <label> elements too.





          Update, here is a working, tested example of an option that cleans logs in /var/log instead of in the user home directory. Notice there is an attribute path=




          <option id="log">

          <label>Log</label>

          <description>Delete the logs</description>

          <action command="delete" search="deep" cache="false" path="/var/log" regex=".log$"/>
          </option>



          Please note that this XML goes into a CleanerML .xml file. In my case, I added it to the existing deepscan.xml, but it could go into a new .xml file that is in the right folder.






          share|improve this answer























          • it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
            – Eka
            Nov 19 at 9:31












          • @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
            – Andrew
            Nov 26 at 17:35










          • No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
            – Eka
            Nov 27 at 9:28










          • @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
            – Andrew
            Nov 28 at 1:21










          • @eka By the way, I edited my answer to show the log cleaner that I tested.
            – Andrew
            Nov 28 at 1:22













          up vote
          1
          down vote










          up vote
          1
          down vote









          As of BleachBit 2.0, deep scan defaults to the home user directory. There is not a way in the GUI to change it, but I think this will work




          1. Copy the deepscan.xml that came with BleachBit to ~/.config/bleachbit/cleaners

          2. Change id="deepscan" to id="mydeepscan"

          3. Add the attribute path="/media/device1" to each <action> element


          Then a new DeepScan option will show up, and you can select it.



          You may also want to change the <label> elements too.





          Update, here is a working, tested example of an option that cleans logs in /var/log instead of in the user home directory. Notice there is an attribute path=




          <option id="log">

          <label>Log</label>

          <description>Delete the logs</description>

          <action command="delete" search="deep" cache="false" path="/var/log" regex=".log$"/>
          </option>



          Please note that this XML goes into a CleanerML .xml file. In my case, I added it to the existing deepscan.xml, but it could go into a new .xml file that is in the right folder.






          share|improve this answer














          As of BleachBit 2.0, deep scan defaults to the home user directory. There is not a way in the GUI to change it, but I think this will work




          1. Copy the deepscan.xml that came with BleachBit to ~/.config/bleachbit/cleaners

          2. Change id="deepscan" to id="mydeepscan"

          3. Add the attribute path="/media/device1" to each <action> element


          Then a new DeepScan option will show up, and you can select it.



          You may also want to change the <label> elements too.





          Update, here is a working, tested example of an option that cleans logs in /var/log instead of in the user home directory. Notice there is an attribute path=




          <option id="log">

          <label>Log</label>

          <description>Delete the logs</description>

          <action command="delete" search="deep" cache="false" path="/var/log" regex=".log$"/>
          </option>



          Please note that this XML goes into a CleanerML .xml file. In my case, I added it to the existing deepscan.xml, but it could go into a new .xml file that is in the right folder.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 28 at 1:22

























          answered Nov 18 at 15:35









          Andrew

          95948




          95948












          • it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
            – Eka
            Nov 19 at 9:31












          • @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
            – Andrew
            Nov 26 at 17:35










          • No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
            – Eka
            Nov 27 at 9:28










          • @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
            – Andrew
            Nov 28 at 1:21










          • @eka By the way, I edited my answer to show the log cleaner that I tested.
            – Andrew
            Nov 28 at 1:22


















          • it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
            – Eka
            Nov 19 at 9:31












          • @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
            – Andrew
            Nov 26 at 17:35










          • No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
            – Eka
            Nov 27 at 9:28










          • @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
            – Andrew
            Nov 28 at 1:21










          • @eka By the way, I edited my answer to show the log cleaner that I tested.
            – Andrew
            Nov 28 at 1:22
















          it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
          – Eka
          Nov 19 at 9:31






          it didn't worked. I went and open deepscan.xml in ~/.config/bleachbit/cleaners then changed cleaner id="mydeepscan" then added the path attribute to every action element <action path="/media/device1" command="delete" search="deep" regex=".[Bb][Aa][Kk]$" cache="false"/>. Then I tried to deepclean. it still shows the home directory on preview
          – Eka
          Nov 19 at 9:31














          @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
          – Andrew
          Nov 26 at 17:35




          @eka After saving the new .xml file, did you notice a new cleaner in the GUI? And did you check the boxes? This is to troubleshoot where the problem may be
          – Andrew
          Nov 26 at 17:35












          No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
          – Eka
          Nov 27 at 9:28




          No I can't see any new cleaner in it. For clarity I have not installed bleachbit in my system instead I am using the portable python version from github.com/bleachbit/bleachbit python bleachbit.py --gui. I changed the deepscan.xml file in this one.
          – Eka
          Nov 27 at 9:28












          @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
          – Andrew
          Nov 28 at 1:21




          @eka I am also using the Git version without installation. I am on Ubuntu 18.10. I made a new cleaner to clean logs in /var/log, and it worked. If you are running without installation and are OK with modifying the original deepscan.xml file, then you do not need to change the id="deepscan". If you want to adjut the path on the existing options, just add the path="media/device" to each action element. If you still have trouble, post your deepscan.xml to a pastebin or gist.
          – Andrew
          Nov 28 at 1:21












          @eka By the way, I edited my answer to show the log cleaner that I tested.
          – Andrew
          Nov 28 at 1:22




          @eka By the way, I edited my answer to show the log cleaner that I tested.
          – Andrew
          Nov 28 at 1:22


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f1093760%2fhow-to-use-bleachbit-to-clean-other-mounted-drives-and-specific-folders%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

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido