diff --git a/Program.cs b/Program.cs
index 2fe89ff..b4a8c8c 100644
--- a/Program.cs
+++ b/Program.cs
@@ -6,7 +6,8 @@
             Console.ResetColor();
         } else {
             switch (args[0]) {
-                case "":
+                case "determinePacmanCacheDirectory":
+                    Pacserver.determinePacmanCacheDirectory();
                     break;
                 default:
                     break;
diff --git a/pacserver.cs b/pacserver.cs
index da563c9..1dbf462 100644
--- a/pacserver.cs
+++ b/pacserver.cs
@@ -1,6 +1,23 @@
+using System.Text.RegularExpressions;
+
 public class Pacserver {
     public static string pacmanCacheDirectory { get; set; } = string.Empty;
     public static string determinePacmanCacheDirectory() {
+        // string defaultPacmanCacheDirectory = "/var/cache/pacman/pkg/";
+
+        Regex regex = new Regex(@"\/(?:[\w.-]+\/)*[\w.-]+(?:\.\w+)*\/?$"); // https://regex101.com/r/GwWeui/2
+        string? line;
+        StreamReader file = new StreamReader(@"/etc/pacman.conf");
+        while ((line = file.ReadLine()) is not null) {
+            if (line.Contains("CacheDir")) {
+                Match match = regex.Match(line);
+                if (match.Success) {
+                    pacmanCacheDirectory = match.ToString();
+                }
+            }
+        }
+        file.Close();
+
         return pacmanCacheDirectory;
     }