As we know installing new programs inevitably increases the size of your Linux distro but unlike Windows 10, it doesn't have to reach 100 GB in less than a month.
I found a way to keep my distro (Arch) as close as possible to the size it was on the day I installed it, which was 15.0 GB. I won't bother you with the details how I found it, I'll just mention that the reason for the increased size over time is the package manager at fault. In Arch case - pacman. IDK why but pacman wasn't made to remove its cache and with time your Arch installation could grow significantly. In my case it had become 60 GB - 12 GB of mods for ETS2 (Euro Truck Simulator 2), 15 GB the operating system itself and the rest was just unnecessary packages in the pacman's cache (33 GB).
Unlike Windows, on Linux you can delete all the cache without corrupting the entire OS.
On Windows if you delete a directory named "winsxs" or something similar, within the next 5 minutes it begins to act strangely and eventually gets badly corrupted. This directory is the reason why Virus 10 (in particular, but it also applies to the rest before Virus 10) becomes 100 GB or even more in less than a month - Virus 10 keeps there copies of entire programs to check their versions and update if needed. So if you have a large program (like Visual Studio which can be 30 GB), it will in fact take 60 GB on your hard drive.
Linux doesn't do that and checks version in another manner, altough I'm not sure what it is yet.
Anyway...
For Arch you need to clear the contents of this directory:
Or, if you're too lazy to clear it every time, you can use an alias, like me:
This alias removes every single file inside the "pkg" directory and shows a report for it, like this:
Now, using this alias my Arch installation is 27 GB with all the programs I use plus the 12 GB of mods for ETS2 which makes the OS itself to be just 15 GB.
I have no idea what the directory would be for other distros such as Debian or Ubuntu which use Aptitude instead of pacman. It's possible to be something like "/var/cache/apt/pkg" but you'll have to check that for yourselves. Whether the path is the same or not depends on the developers of your distro.
I found a way to keep my distro (Arch) as close as possible to the size it was on the day I installed it, which was 15.0 GB. I won't bother you with the details how I found it, I'll just mention that the reason for the increased size over time is the package manager at fault. In Arch case - pacman. IDK why but pacman wasn't made to remove its cache and with time your Arch installation could grow significantly. In my case it had become 60 GB - 12 GB of mods for ETS2 (Euro Truck Simulator 2), 15 GB the operating system itself and the rest was just unnecessary packages in the pacman's cache (33 GB).
Unlike Windows, on Linux you can delete all the cache without corrupting the entire OS.
On Windows if you delete a directory named "winsxs" or something similar, within the next 5 minutes it begins to act strangely and eventually gets badly corrupted. This directory is the reason why Virus 10 (in particular, but it also applies to the rest before Virus 10) becomes 100 GB or even more in less than a month - Virus 10 keeps there copies of entire programs to check their versions and update if needed. So if you have a large program (like Visual Studio which can be 30 GB), it will in fact take 60 GB on your hard drive.
Linux doesn't do that and checks version in another manner, altough I'm not sure what it is yet.
Anyway...
For Arch you need to clear the contents of this directory:
Code:
/var/cache/pacman/pkg
Or, if you're too lazy to clear it every time, you can use an alias, like me:
Code:
#deleting pacman cache
alias pacc="sudo rm -rv /var/cache/pacman/pkg/*"
This alias removes every single file inside the "pkg" directory and shows a report for it, like this:
Code:
[rado@arch]: ~>$ pacc
„'/var/cache/pacman/pkg/lib32-libdrm-2.4.102-1-x86_64.pkg.tar.zst'“ was removed
„'/var/cache/pacman/pkg/lib32-sqlite-3.32.1-1-x86_64.pkg.tar.zst'“ was removed
„'/var/cache/pacman/pkg/libdrm-2.4.102-1-x86_64.pkg.tar.zst'“ was removed
„'/var/cache/pacman/pkg/sqlite-3.32.1-1-x86_64.pkg.tar.zst'“ was removed
Now, using this alias my Arch installation is 27 GB with all the programs I use plus the 12 GB of mods for ETS2 which makes the OS itself to be just 15 GB.
I have no idea what the directory would be for other distros such as Debian or Ubuntu which use Aptitude instead of pacman. It's possible to be something like "/var/cache/apt/pkg" but you'll have to check that for yourselves. Whether the path is the same or not depends on the developers of your distro.
Last edited: