<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: lithoeme</title>
    <description>The latest articles on Forem by lithoeme (@lithoeme).</description>
    <link>https://forem.com/lithoeme</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2535525%2F033cc951-c61f-4d9e-9cfa-059d8102b288.png</url>
      <title>Forem: lithoeme</title>
      <link>https://forem.com/lithoeme</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lithoeme"/>
    <language>en</language>
    <item>
      <title>Clean Your Linux Device</title>
      <dc:creator>lithoeme</dc:creator>
      <pubDate>Sun, 05 Jan 2025 23:14:47 +0000</pubDate>
      <link>https://forem.com/lithoeme/clean-your-linux-device-5h44</link>
      <guid>https://forem.com/lithoeme/clean-your-linux-device-5h44</guid>
      <description>&lt;p&gt;Use these commands to clean your linux device and get back to what it is you like to do. (Unless you like to clean linux systems; then please drop a comment below :D)&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Remove Unnecessary Packages&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use the following commands to remove unused packages and their dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Remove packages that are no longer required:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt autoremove
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove unused packages and old dependencies (on Debian-based systems):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get clean
 &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get autoclean
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clean up package cache:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get clean
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Clear System Logs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;System logs can consume significant space. You can truncate or delete logs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Clear the &lt;code&gt;journal&lt;/code&gt; logs (on systemd systems):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;--vacuum-size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100M
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clear old log files:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /var/log/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Delete Unused Temporary Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Clean up temporary files that are no longer needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;tmpwatch&lt;/code&gt; (if installed) to clean temporary files in &lt;code&gt;/tmp&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;tmpwatch &lt;span class="nt"&gt;--mtime&lt;/span&gt; 24 /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alternatively, clear &lt;code&gt;/tmp&lt;/code&gt; manually:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /tmp/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Find and Remove Large Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;find&lt;/code&gt; command to locate and delete large files that are taking up space:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;List files larger than 1GB:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;find / &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +1G
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Delete files over a specific size:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;find /path/to/folder &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +500M &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Clean Package Cache&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you've installed and updated many packages, cached files can build up over time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Clean package manager cache (for &lt;code&gt;apt&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get clean
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For &lt;code&gt;dnf&lt;/code&gt; (on Fedora/RHEL-based systems):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;dnf clean all
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. &lt;strong&gt;Check for Large Directories&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;du&lt;/code&gt; to find large directories and identify where space is being used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Check the largest directories in your home folder:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nt"&gt;--max-depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 ~/
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;Remove Old Snapshots (if using LVM or Snap)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you're using LVM, delete old snapshots:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;List LVM snapshots:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;lvs
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove a snapshot:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;lvremove /dev/mapper/your-snapshot
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If using &lt;code&gt;snap&lt;/code&gt;, clean up unused snap versions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;sudo &lt;/span&gt;snap list &lt;span class="nt"&gt;--all&lt;/span&gt;
   &lt;span class="nb"&gt;sudo &lt;/span&gt;snap remove &amp;lt;snap-name&amp;gt; &lt;span class="nt"&gt;--revision&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;revision-number&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8. &lt;strong&gt;Check for Orphaned Packages (Optional)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use tools like &lt;code&gt;deborphan&lt;/code&gt; to find and remove orphaned libraries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;code&gt;deborphan&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;deborphan
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;List orphaned libraries:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; deborphan
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove orphaned libraries:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get remove &lt;span class="nt"&gt;--purge&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;deborphan&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By following these steps, you can clean up unnecessary files and open up space on your Linux device.&lt;/p&gt;

&lt;p&gt;edit: tmpwatch deprecated.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>terminal</category>
    </item>
    <item>
      <title>created a site where you can scrape data from any url you want</title>
      <dc:creator>lithoeme</dc:creator>
      <pubDate>Sun, 05 Jan 2025 20:21:48 +0000</pubDate>
      <link>https://forem.com/lithoeme/created-a-site-where-you-can-scrape-data-from-any-url-you-want-bcj</link>
      <guid>https://forem.com/lithoeme/created-a-site-where-you-can-scrape-data-from-any-url-you-want-bcj</guid>
      <description>&lt;p&gt;used flask, beautifulsoup, and render to host. just put url in and choose what data you'd like and it spits out data and a txt file to download.&lt;/p&gt;

&lt;p&gt;let me know what you think?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://souper.onrender.com/" rel="noopener noreferrer"&gt;https://souper.onrender.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>beautifulsoup</category>
      <category>webscraping</category>
    </item>
  </channel>
</rss>
